Vano
Vano

Reputation: 1538

NGINX dynamically add/remove configuration

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...

Upvotes: 1

Views: 886

Answers (1)

Ahmed Abdelazim
Ahmed Abdelazim

Reputation: 741

I think this is possible in plus version see documentation https://www.nginx.com/blog/dynamic-reconfiguration-with-nginx-plus/

Upvotes: 1

Related Questions