💾 Archived View for chirale.org › 2018-08-01_4243.gmi captured on 2024-07-08 at 23:36:50. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-12)

-=-=-=-=-=-=-

nginx: [emerg] open() “/usr/share/nginx/off” failed (13: Permission denied) [SOLVED]

After a failed restart of the nginx server, you can get this error typing journalctl -xe:

nginx: \[emerg\] open() “/usr/share/nginx/off” failed (13: Permission denied) \[SOLVED\]

This is caused by a misconfiguration of nginx.conf or a conf inside the /etc/nginx/conf.d/ directory where there’s something like:

 error_log off; 

This is the wrong way to disable logs. Nginx is actually trying to write a file called off inside the default folder.

The right way

To disable error_log simply do not declare it in your .conf file.

To stop logging accesses, you can disable access_log writing in your .conf file:

 access_log off; 

https://web.archive.org/web/20180801000000*/http://nginx.org/en/docs/http/ngx_http_log_module.html