access log off nginx not working ?

Valentin V. Bartenev ne at vbart.ru
Sat Jul 7 15:51:14 UTC 2012


On Saturday 07 July 2012 17:52:52 gyre007 wrote:
[...]
> The problem with this configuration is that the drop.conf file is
> completely "ignored" because of what you said - so when I take
> error_page bit out then drop.conf file is suddenly taken into account
> and favicon.ico is no longer being logged. The question is how do I
> handle this situation -> return 404 page when someone is accessing non
> existing PHP URI and at the same time disable logging as per drop.conf
> file ? Im banging my head against the table.
> Any help appreciated.
> 

  error_page 404 /errors/404.html;

  location /errors/ {
      internal;
      root /var/www;
  }

  location /errors/nolog/ {
      internal;
      alias /var/www/errors/;
      access_log off;
  }

  location = /favicon.ico {
      error_page 404 /errors/nolog/404.html;
      log_not_found off;
  }

etc...

 wbr, Valentin V. Bartenev



More information about the nginx mailing list