HTTP variables
$host variable (HTTP)
Effective host name selected from request target, Host field or matching server name in that order. Not proof of identity.
Formal Syntax & Structure
nginx syntaxnginx
$hostWorking Example
Example Snippetnginx
# Partial location example; synthetic lab onlyreturn 200 "$host\n";