If you know what you are doing and have a pretty good reason to do it, this is one way to do it.


ln -fs /dev/null /var/log/nginx/error.log
ln -fs /dev/null /var/log/nginx/vhost-error_log

the command will clear the content of the files and create a junction to “/dev/null”. All further logs will be sent to blackhole (discarded).

GD Star Rating
loading...
Disable error.log and vhost-error_log in Nginx, 5.0 out of 5 based on 3 ratings