503 custom error page

djeyewater nginx-forum at nginx.us
Fri Dec 23 10:11:57 UTC 2011


I'm trying to get a maintenance page working for my site. I added the
following to the server block:

error_page 503 /maintenance.html;
return 503;

This serves 503 but with default nginx 503 error page.

The following works okay, but I don't understand why the above doesn't
show the custom 503 page?

error_page 503 @503;
return 503;
location @503 {
	try_files /maintenance.html =503;
}

Thanks

Dave

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,220418,220418#msg-220418



More information about the nginx mailing list