Remove from error_log favicon.ico

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 :slight_smile:

Thanks!

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;
}

On Wed, Jan 14, 2009 at 5:31 PM, Robert G. [email protected]
wrote:

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

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

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

Another option;

location = /favicon.ico {
return 204;
}

Cheers

Dave

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 :slight_smile:

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 :slight_smile:

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

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 ?