Rewrite rule for nginx image?

Hi all,

I have a small image that I’ve downloaded from nginx.net 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?

Thanks for your help,

Floren

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

I have a small image that I’ve downloaded from nginx.net 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, what I try to do is this:
When someone visits a missing page, he/she is pointed to a 404 custom
page.
Example:
http://69.156.32.106/tester/

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?

Thanks.

On Sun, Jan 06, 2008 at 07:14:20PM -0500, Floren M. wrote:

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

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?

You should set abosolute pathes for nginx.gif and favicon.ico in the
page:

  • nginx.gif
    
  • /nginx.gif
    
  • favicon.ico
    
  • /favicon.ico

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs