Is it possible to rewrite an error page in nginx config

Pardoner asked:

I have the following in my nginx config file.

error_page 503;

Which servers up a static html file stored on Rackspace Cloudfiles. What I don’t like is how the url changes to … I’d rather rewrite the url so the domains appears to have stayed the same. Is it possible to rewrite error page url to something like



My answer:

Sorry, but in order to not have a client redirected to an external URL, you will have to host the file on your local filesystem. (Though any images, CSS etc. that it might load can remain on the CDN.)

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.