HTTP variables
$http_host variable (HTTP)
Incoming Host field, potentially including a port. Client-controlled.
Formal Syntax & Structure
nginx syntaxnginx
$http_hostWorking Example
Example Snippetnginx
# Partial location example; synthetic lab onlyreturn 200 "$http_host\n";