Skip to content
Nginx

Variables API Reference

Built-in Nginx variables exposing request and connection properties usable in directives.

By EZ4Code Team

Variables

Commonly used built-in variables available in the http context.

$host

Lowercase host name from the request line, or Host header, or server name matched.

Returns: string

$request_uri

Full original request URI including query string, unmodified.

Returns: string

$remote_addr

Client IP address of the connection.

Returns: string

$args | $query_string

Full query string from the request line; identical values.

Returns: string

$scheme

Request scheme: http or https.

Returns: string

$http_<name>

Value of the request header whose lowercased name with dashes replaced by underscores is <name>.

Returns: string

More Nginx API References