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.
15fc40290c76b33850cc13438566b072?d=identicon&s=25 Robert Gabriel (jinx)
on 2009-01-14 11: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!
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-01-14 12:17
(Received via mailing list)
On Wed, Jan 14, 2009 at 11:31:28AM +0100, Robert Gabriel 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;
   }
96dfd0f0a8399d3b03feba1e6a562e0a?d=identicon&s=25 Edho P Arief (Guest)
on 2009-01-14 14:19
(Received via mailing list)
On Wed, Jan 14, 2009 at 5:31 PM, Robert Gabriel <lists@ruby-forum.com>
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
Fda08117336cfde6562315df04b976e8?d=identicon&s=25 Dave Cheney (Guest)
on 2009-01-14 15: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
15fc40290c76b33850cc13438566b072?d=identicon&s=25 Robert Gabriel (jinx)
on 2009-01-14 17:11
Dave Cheney 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 :)
Fda08117336cfde6562315df04b976e8?d=identicon&s=25 Dave Cheney (Guest)
on 2009-01-14 21:49
(Received via mailing list)
Another option;

location = /favicon.ico {
  return 204;
}

Cheers

Dave
416043ea00c0535011134cc6b750e01b?d=identicon&s=25 duckpond (Guest)
on 2009-01-17 07:44
(Received via mailing list)
Robert Gabriel <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
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-01-17 09:23
(Received via mailing list)
On Fri, Jan 16, 2009 at 08:49:32PM +0000, duckpond wrote:

> Robert Gabriel <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.