default page

Marcos Neves marcos.neves at
Wed Jul 2 14:04:22 MSD 2008

I realize that error_page will never work, cause I need to send a file
that is not reachable by uri,
those files are inside nginx html folder.
What now?

On Tue, Jul 1, 2008 at 1:18 PM, Cliff Wells <cliff at> wrote:
> 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

Marcos Neves
+55 44 3263-8132
+55 44 9918-8488

More information about the nginx mailing list