I am looking for a nginx solution that would display a temporary down message when the underling server is down.
I am looking or a solution that would behave like this:
- display a maintenance page (503) if the upstream server is down
- display a timeout (504) if the upstream server did not return any content in 60 seconds (it could take more to return the entire content)
- optionally: find a way of measuring the time spend from when the service went down first time so I can display a maintenance message: but send an email to the admin if this still happens for more than 5 minutes.
To reiterate, the whole point is to make a config that allows the server administrator to restart the upstream servers without having to manage the maintenance messages.