Log 404 errors only?

Igor Sysoev is at rambler-co.ru
Tue Jan 20 16:48:25 MSK 2009


On Tue, Jan 20, 2009 at 02:44:05PM +0100, Peter Hinse wrote:

> is there any way to log only HTTP codes >= 400 (maybe only 404 errors)
> in the access.log? I'm not interested in successful delivery, redirects
> or similar.

      location / {
          access_log  off;
          error_page  404  /404;
      }

      location = /404 {
          access_log  /path/to/log;
      }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list