Rewrite rule for nginx image?

Floren Munteanu nginx at
Mon Jan 7 03:14:20 MSK 2008

Igor, what I try to do is this:
When someone visits a missing page, he/she is pointed to a 404 custom page.

Look at the image, it is not showing. Is there a way to properly display the
nginx.gif image, using a condition defined into the server config file?


-----Original Message-----
From: owner-nginx at [mailto:owner-nginx at] On Behalf Of Igor
Sent: Sunday, January 06, 2008 2:30 PM
To: nginx at
Subject: Re: Rewrite rule for nginx image?

On Sun, Jan 06, 2008 at 02:11:48PM -0500, Floren Munteanu wrote:

> I have a small image that I've downloaded from and use it a logo
> for the 404 pages.
> What would be the code I need to insert into nginx.conf, in order to
> automatically point the image location to a specific path or URL?

I do not understand your question, but probably:

        location = /logo.gif {
            root  /path/to;

            # or
            #alias  /path/to/logo.gif;

Igor Sysoev

More information about the nginx mailing list