Hi there,
> I'm able to get nginx
> to return a 503 page by adding it to the top of the location. But that
> just returns the default nginx error page. How to do change this to a
> custom page?
Does http://www.nginx.org/r/error_page give the info you need?
f
--
Francis Daly fra...@daoine.org
_______________________________________________
nginx mailing list
ng...@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Hi there,
> How do I get nginx to serve the page? I added in the line from the link,
> but I still get the default nginx page, not my custom one.
===
server {
error_page 503 /my-503-error.html;
location / {
return 503;
}
location = /my-503-error.html {
internal;
}
}
===
will serve the content of the file my-503-error.html in your document
root with a http status 503 for (almost) every request to this server.
Hi there,
> I added this into my config file, and put my-503-error.html in the same
> location as the default 50x.html file, but all I get is a generic 404 error
> page.
You got an error page.
What does the error log say?
Either put your 503 file there; or configure "root" so that it is correct
within this location{}.
If you're still having problems, please follow the "debug" instructions
to make it easier for people to help you.
Details on the web site, but in brief:
what did you do?
what did you see?
what did you expect to see?
and the more specific you are, the easier it will be for someone else to
reproduce the problem you are reporting.
Good luck with it,
Hi there,
> I got my error page to show up. However, the css and image files don't
> load. I tried changing the location, but that doesn't seem to work.
>
> Any suggestions?
Try changing the location again. Maybe it will work this time.
Or alternatively:
Please fill in the details:
> > what did you do?
That will be something like "curl -i http://myserver/myfile.css"
> > what did you see?
That will be whatever you got back -- the content of /var/tmp/myfile.css,
or the content of another file, or some error message. There might be
more details available in log files.
> > what did you expect to see?
That will be something like "http 200 and the content of
/usr/local/nginx/html/myfile.css".
> > and the more specific you are, the easier it will be for someone else to
> > reproduce the problem you are reporting.
Provide the relevant part of nginx.conf from a machine where you saw
the problem. If you don't know what is the relevant part, provide the
whole thing.
It doesn't have to be your "live" config, but it should be a config that
you ran on a test machine. The smaller the config, the better.
If you make it easy for someone to run the same server config as you,
and run the same client commands as you, and see the same error output
as you; then you make it easy for that person to try to help resolve the
problem you saw.
If you don't, you don't.