Stream mapping directives
map (stream)
stream context; derives a variable from source data. Literal source strings are case-insensitive; use a fixed explicit default.
Formal Syntax & Structure
nginx syntaxnginx
map string $variable { ... }Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| source | string expression | Evaluate source variables when destination is used. |
| variable | $variable | Destination variable; body defines matches and results, with explicit safe default. |
Working Example
Example Snippetnginx
map $ssl_preread_server_name $destination { atlas.test 127.0.0.1:19241; grove.test 127.0.0.1:19242; default 127.0.0.1:19243;}