state

Syntax: state file;
Default:
Context: upstream

This directive appeared in version 1.9.7.

Specifies a file that keeps the state of the dynamically configurable group.

Examples:

state /var/lib/nginx/state/servers.conf; # path for Linux
state /var/db/nginx/state/servers.conf;  # path for FreeBSD

The state is currently limited to the list of servers with their parameters. The file is read when parsing the configuration and is updated each time the upstream configuration is changed. Changing the file content directly should be avoided. The directive cannot be used along with the server directive.

Changes made during configuration reload or binary upgrade can be lost.
This directive is available as part of our commercial subscription.
doc_nginx
2017-02-09 07:09:39
Comments
Leave a Comment

Please login to continue.