How to disable NGINX logging on Linux system -

The default configuration of Nginx webserver logging system is to log both access and error logs for all enabled sites into /var/log/nginx/access.log and /var/log/nginx/error.log respectively. This default behaviour is set by the following directives found within /etc/nginx/nginx.conf configuration file:
This is a companion discussion topic for the original entry at



Actually, that works with access_log, but error_log off; writes the log to file named ‘off’. So “error_log /dev/null” does the trick.



acturelly, this is wrong, nging will write log into a file called off
you should redirect access_log to /dev/null