Background: I have a full fledged web service that's performing an important function + authentication / authorization and statistics and all that. In case it fails I'd like to enable access to another simpler service that's only performs the important function.
Ideally I would think of location + proxy_pass that is disabled by default and can be enabled either if some health check URL is unavailable or by nginx cli command with some flag / special local URL
The problem is: I couldn't find such functionality it NGINX. What am I missing?
ps - I am aware that's possible to edit the configuration file automatically + reload, trying to find more elegant solution...