August 24, 2012 04:31AM
I have been trying for a whole day to figure out how to redirect 404 errors to a separate log file. I managed to do this in the server directive:

error_page 404 = @404;
location @404 {
error_log /var/log/nginx/404.log;
}

This does write all 404 errors to 404.log, but the problem is that it also writes these errors in the default error.log, and I don't want that. I want 404 errors to be writtent to only into the 404.log.

Do you have an idea how to do this?
Subject Author Posted

Redirect 404 errors to a separate log file

kustodian August 24, 2012 04:31AM

Re: Redirect 404 errors to a separate log file

Maxim Dounin September 03, 2012 04:50AM

Re: Redirect 404 errors to a separate log file

kustodian September 07, 2012 05:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready