default page

Cliff Wells cliff at develix.com
Tue Jul 1 20:18:14 MSD 2008


On Tue, 2008-07-01 at 11:08 -0300, Marcos Neves wrote:
> The point is that I want to return a default icon, but only if the
> site doesn´t have one.
> That´s why the ugly if (!-f $request_filename) { construction.
> empty_gif; wouldn´t solve the problem ether.
> I´m using the same for show a default error page if the domain doesn´t
> have it´s own.
> 
> Do you think that touch disk with !-f $request_filename can be a
> problem for performance?

What's wrong with using the error_page directive?  If you are returning
the same gif for all domains that don't have a favicon it should work
fine.  As Maxim pointed out, you can override the 404 return code.

Cliff






More information about the nginx mailing list