August 2017
Intermediate to advanced
278 pages
8h 53m
English
While our example recipe allows for changes to be made on the fly, they aren't persistent if we reboot NGINX Plus. To ensure these changes are maintained between reboots, we can add a state file to manage the current configuration. This is done via updating the upstream block directive. Here's what our updated configuration looks like:
upstream localapp {
zone backend 64k;
state /var/lib/nginx/state/servers.state;
}
We add the state directive, which is updated when there are any changes to the upstream configuration as well as being reread when NGINX restarts. All other server directives within that upstream must also be removed, as you can't combine static server configuration with a dynamic, stateful configuration. The ...
Read now
Unlock full access