Variable - Nginx
These expressions are equivalent
$uri
"$uri"
${uri}
"${uri}"
| Variable | Alias | Description |
|---|---|---|
$uri | $document_uri | URI, exclude $args, change when internal redirect / using index |
$args | $query_string | query string (the string after ? in URI) |
$document_root | root or alias value | |
$host | $host | |
$http_host | Host request header field | |
$request_uri | $request | full original request URI (with $args) |
$remote_addr | client IP address | |
$remote_port | client port |
$host
In this order of precedence (from high to low)
- Host name from the request line
Hostrequest header field- The server name matching a request