SMOLNET PORTAL home about changes

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 (https://web.archive.org)
Response: 20 (Success), text/gemini
Original URLgemini://chirale.org/2018-08-01_4243.gmi
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8