Forum: NGINX remove from error_log favicon.ico

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Robert G. (Guest)
on 2009-01-14 12:31
Hello, I dont have the "favicon.ico" on my web site, but in the logs I
have a tons of errors that favicon.ico not found. I know is possible in
the config file to add a line or something similar which will not logged
anymore favicon.ico as missing...

Please help me out :)

Thanks!
Igor S. (Guest)
on 2009-01-14 13:17
(Received via mailing list)
On Wed, Jan 14, 2009 at 11:31:28AM +0100, Robert G. wrote:

> Hello, I dont have the "favicon.ico" on my web site, but in the logs I
> have a tons of errors that favicon.ico not found. I know is possible in
> the config file to add a line or something similar which will not logged
> anymore favicon.ico as missing...

   location = /favicon.ico {
      access_log     off;
      log_not_found  off;
   }
Edho P Arief (Guest)
on 2009-01-14 15:19
(Received via mailing list)
On Wed, Jan 14, 2009 at 5:31 PM, Robert G. 
<removed_email_address@domain.invalid>
wrote:
>
>

modern browsers generally requests favicon.ico for every sites it
visits.

adding zero-bytes favicon.ico is better, imo (or not?)

http://en.wikipedia.org/wiki/Favicon
Dave C. (Guest)
on 2009-01-14 16:12
(Received via mailing list)
Or even better, have a favicon. You can't stop the requests if you
don't have one, but if you do return a 200 response you can set
advisory cache headers on it.

Cheers

Dave
Robert G. (Guest)
on 2009-01-14 18:11
Dave C. wrote:
> Or even better, have a favicon. You can't stop the requests if you
> don't have one, but if you do return a 200 response you can set
> advisory cache headers on it.
>
> Cheers
>
> Dave

Thx guys, I added what Igor said, and it works very nice. I might add
faicon.ico to my web site, but thats not really a priority. Until then
Igor's idea works for me :)
Dave C. (Guest)
on 2009-01-14 22:49
(Received via mailing list)
Another option;

location = /favicon.ico {
  return 204;
}

Cheers

Dave
duckpond (Guest)
on 2009-01-17 08:44
(Received via mailing list)
Robert G. <lists@...> writes:

>
> Hello, I dont have the "favicon.ico" on my web site, but in the logs I
> have a tons of errors that favicon.ico not found. I know is possible in
> the config file to add a line or something similar which will not logged
> anymore favicon.ico as missing...
>
> Please help me out :)
>
> Thanks!


My problem is little different: I do lots of site editing from home
computer,
that generates quite some access logs from my home IP, how do I tell
nginx
not to log hits from certain IPs?

Thanks,

duckpond
Igor S. (Guest)
on 2009-01-17 10:23
(Received via mailing list)
On Fri, Jan 16, 2009 at 08:49:32PM +0000, duckpond wrote:

> Robert G. <lists@...> writes:
>
> > Hello, I dont have the "favicon.ico" on my web site, but in the logs I
> > have a tons of errors that favicon.ico not found. I know is possible in
> > the config file to add a line or something similar which will not logged
> > anymore favicon.ico as missing...
>
> My problem is little different: I do lots of site editing from home computer,
> that generates quite some access logs from my home IP, how do I tell nginx
> not to log hits from certain IPs?

There is no good way to to this.
Why these IPs may not be ignored at parsing stage ?
This topic is locked and can not be replied to.