$ cat /etc/issue
Open the “nginx.conf” file (usually located : /etc/nginx folder) or the Nginx config file for a particular site, for which you wish to turn off nginx logs (usually located in : /etc/nginx/sites-available folder).
Find the line :
Some people simply change the line to the following :
Please note that this will not stop the nginx logs from being created on the server.
This will just create the logs in : “/usr/share/nginx/off” file.
If you wish to turn off the Nginx error logs completely, you need to change the line to :
error_log /dev/null crit;
This will completely turn off the Nginx error logs on your server.