HTTP variables
$server_name variable (HTTP)
Name of the accepting virtual server, which can differ from the requested alias.
Formal Syntax & Structure
nginx syntaxnginx
$server_nameWorking Example
Example Snippetnginx
# Partial location example; synthetic lab onlyreturn 200 "$server_name\n";