Not logging access to favicon.ico

Jonathan Matthews contact at
Thu Jan 17 23:22:12 UTC 2013

On 17 January 2013 22:53, Agus <agus.262 at> wrote:
> location is only available in server block. Though you could create a file
> with the location /favicon... and then include it in every server block
> which will save you typing.

I do this. I'm /sure/ I've seen some historic user-agents requesting
"favico.ico" or something like that, so I place it under a location of
just /favico.

Mik - you may find that a 204 is not what you want to return, as
browsers /may/ not cache such a 0-byte file for the favicon. I use
this, and include it in every server{} stanza:

location /favico {
  access_log off;
  error_log /dev/null crit;

I'm fully aware it doesn't work on IE, due to IE only supporting
properly-formed Icon format files; fuck those guys.

Jonathan Matthews // Oxford, London, UK

More information about the nginx mailing list