Custom forced 503 page does not work

skchopperguy nginx-forum at nginx.us
Wed Jul 31 06:51:43 UTC 2013


Hi,

 Nginx reads from top to bottom, just like you. In your example, you are
returning 503 (an action) before instructing to use your custom error page.
Just need to put your instructions first, then your actions...like so:

error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }

location / { return 503; }


-Skyler

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



More information about the nginx mailing list