Disable Nginx logging of 403 errors Disable Nginx logging of 403 errors nginx nginx

Disable Nginx logging of 403 errors


Theoretically, you can specify a named location to handle 403 and disable error logging there:

error_page 403 = @403_handler;location @403_handler {    error_log /dev/null;}

Doesn't have to be a named location though:

error_page 403 /403.html;location = /403.html {    error_log /dev/null;}