Custom error pages

Francis Daly francis at daoine.org
Thu Mar 15 19:24:09 UTC 2012


On Thu, Mar 15, 2012 at 10:48:13AM -0400, Bai Shen wrote:

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.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list