How set up a maintenance page when droplet is off, restarting or not responding to a specific port?
Consider the following:
I have a Droplet currently working and configured, with a domain pointing to it, serving something from some port (for e.g. nginx serving a website on 80/443, or a mySQL on 3306).
I’d like to configure for the domain a 503 (Service Unavailable) page when Droplet is currently Turned off, is in a process (for e.g. restarting, re-scaling) or when it’s not serving something on said port (for e.g, Droplet is on but mysql or nginx daemons are off because either crashed or I’m currently giving maintenance).
How can I serve said HTTP response on each of these cases?
This is a lot better than simply having the domain give dns/timeout error.
This question from 2014 asks the same thing, but the response given totally hit the mark, like the person didn’t even try to read the question and just blindly answered the inner questions, which were suppositions/thoughts.