I have a WSGI server behind by nginx. Say I bring the WSGI instance down for maintenance/update, is there a nice way of nginx automatically serving up any requests to that application with a specified HTML file?
1 Answer
Create a static page /50x.html
with your desired content, and then add something like this to your nginx configuration:
error_page 502 503 504 /50x.html;
The error_page directive is used to override nginx's internal error pages.