HTTP directives
geo directive (HTTP)
HTTP context; no directive default. Classifies an address using a configured prefix or range table. The usual input is $remote_addr. CIDR matches prefer the most specific prefix. The volatile parameter requires 1.29.3.
Formal Syntax & Structure
nginx syntaxnginx
geo [$address] $variable { ... }Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| $address | string | Optional address source |
| $variable | string | Result variable |
Working Example
Example Snippetnginx
geo $network { default outside; 192.0.2.0/24 demo;}