Nginx logfiles not working? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
wmcig
Posts: 39
Joined: Wed Aug 25, 2021 12:17 pm

Nginx logfiles not working?

Post by wmcig »

I try to use the nginx error and access logfiles. To activate them I should use the following command. But it does not work:

Code: Select all

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error_log;
-bash: access_log: command not found
-bash: error_log: command not found
Need help for activating it.
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Nginx logfiles not working?

Post by Joulinar »

you can have a look to /var/log/nginx/ if they exist.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
wmcig
Posts: 39
Joined: Wed Aug 25, 2021 12:17 pm

Re: Nginx logfiles not working?

Post by wmcig »

Joulinar wrote: Mon Nov 08, 2021 2:48 pm you can have a look to /var/log/nginx/ if they exist.
They already exist.
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Nginx logfiles not working?

Post by Joulinar »

did you add following to your config file

Code: Select all

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
or did you try to execute it on CLI?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
wmcig
Posts: 39
Joined: Wed Aug 25, 2021 12:17 pm

Re: Nginx logfiles not working?

Post by wmcig »

I tried from my terminal.

Do I have to put this into the files in /var/log/nginx/?
User avatar
Joulinar
Posts: 6525
Joined: Sat Nov 16, 2019 12:49 am

Re: Nginx logfiles not working?

Post by Joulinar »

yes, these are configuration parameter and not CLI commands.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply