Nginx rewrite rule for favicon.ico files

nexon nginx-forum at
Fri Aug 31 11:27:38 UTC 2012

Igor Sysoev Wrote:
> Why not to create a separate server block for each site instead of
> this
> if/rewrite mess ?
> --
> Igor Sysoev
> _______________________________________________
> nginx mailing list
> nginx at

Can't do that, because I have to serve different favicon.ico to different
In example, there is several domains in server_name and some of them need 
to have their own favicon.ico,
if there is no favicon.ico for some of them, than they need to be served
with the main favicon.ico file.

Posted at Nginx Forum:,230375,230384#msg-230384

More information about the nginx mailing list