I am using HAproxy in front of an app that is on multiple other servers. I would like to set up a vhost in a local nginx instance that only serves a 503 for every request (to use as the 'backup' server when all backends are down). I know how to set the custom error page (as in How can I make Nginx return HTTP 503 when my proxied app server is down?) but how I can make it so that every request to nginx returns a 503?
nginx – How to Make Nginx Always Return HTTP 503
503-errorhaproxynginx
Related Topic
- Nginx – How to make Nginx return HTTP 503 when the proxied app server is down
- NGINX return correct headers with custom error documents
- Nginx with Passenger behind HAProxy causes 503 errors
- Nginx: error_page does not work
- Nginx – How to deploy a 503 maintenance page when upgrading a Digital Ocean droplet
Best Answer
This doesn't work?
There might be some tricks you have to use to get assets to show up on your custom error page (i.e., say your 503.html has an image in it. You have to do some logic to make the image show up with a 200 code, otherwise it'll be missing with a 503).