HTTP directives
state directive (HTTP)
Persist dynamically managed peer definitions in a dedicated state file. No default. Context upstream. Do not combine with static server entries or hand-edit the managed file. Reload or binary replacement can lose concurrent changes; plan reconciliation. Version: 1.9.7. Commercial subscription; provision writable state directory and approved dynamic management before actual use. Example: partial http configuration for a disposable synthetic lab; not a complete deployment.
Formal Syntax & Structure
nginx syntaxnginx
state file;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| file | file path | Dedicated approved state file owned by the lab service. |
Working Example
Example Snippetnginx
upstream lab_state { zone lab_state_zone 64k; state state/lab-peers.conf;}