Welcome! Log In Create A New Profile

Advanced

Re: access log off nginx not working ?

Maxim Dounin
July 07, 2012 03:24AM
Hello!

On Fri, Jul 06, 2012 at 07:45:29PM -0400, gyre007 wrote:

> I have the following drop.conf files located in /etc/nginx/drop.conf
>
> location = /favicon.ico { access_log off; log_not_found off; }

[...]

> Strange thing is when I include it in whichever server directive - ie in
> whichever virtual host I have configured - I'm still getting favicon
> logs in my access log. Is this a BUG ??
> It looks like the include is simply not working ?
>
> Example of the virtual host I'm including this in:
>
> server {

[...]

> error_page 404 /errors/404.html;
> location /errors/ {
> alias /var/www/errors/;
> internal;
> }

[...]

> ***** - - [06/Jul/2012:22:16:05 +0000] "GET /favicon.ico HTTP/1.1" 404
> 134 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4)
> AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47
> Safari/536.11"

[...]

> Am I missing out something really obvious ?

Requests are logged in context of a location where request
execution ends up. As you have error_page 404 defined, and no
favicon.ico file - error 404 is generated and redirected to
/errors/404.html. As a result request is logged in context of
"location /errors/" where you have access log enabled.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

access log off nginx not working ?

gyre007 July 06, 2012 07:45PM

Re: access log off nginx not working ?

Maxim Dounin July 07, 2012 03:24AM

Re: access log off nginx not working ?

gyre007 July 07, 2012 09:52AM

Re: access log off nginx not working ?

Valentin V. Bartenev July 07, 2012 11:52AM

Re: access log off nginx not working ?

Ruslan Ermilov July 12, 2012 09:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
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