Nginx Complete Reference Index

Select any item below to open its full syntax specification, parameters, and live example.

Nginx Tutorial

HTTP variables

18 entries
$acme_certificate variable (HTTP ACME)$acme_certificate
Provides the issued TLS certificate to the SSL configuration. Check actual certificate and chain after issuance. Context: server with acme_certificate. Module release note: no specific introduction version stated on directive page. Requires the separately available ACME module; confirm the exact package/build. Illustrative only, not executed.
$acme_certificate_key variable (HTTP ACME)$acme_certificate_key
Provides the corresponding private key for TLS use. Never put this value in logs, headers or responses. Context: server with acme_certificate. Module release note: no specific introduction version stated on directive page. Requires the separately available ACME module; confirm the exact package/build. Illustrative only, not executed.
$arg_* variable family (HTTP)$arg_*
Read a named query argument, for example $arg_category from ?category=books. Treat it as untrusted input; do not make a cache or authorization decision without validating the expected representation. The asterisk represents a name suffix, not literal configuration syntax. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$args variable (HTTP)$args
Current query arguments; can change and may contain private data.
$binary_remote_addr variable (HTTP)$binary_remote_addr
Packed address bytes rather than printable text: IPv4 occupies four bytes and IPv6 sixteen. Useful for compact per-address keys such as a rate-limit zone. Avoid rendering raw bytes as text. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$body_bytes_sent variable (HTTP core)$body_bytes_sent
Bytes sent excluding response headers. Distinct from total bytes sent.
$bytes_sent variable (HTTP)$bytes_sent
Measure total outbound bytes attributed to a request, including response headers. Compare with $body_bytes_sent for body-only accounting; neither is a network packet capture. Version: 1.3.8 / 1.2.5. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$connection variable (HTTP)$connection
Connection serial identifier for correlating multiple requests on one transport connection. Not a durable global request ID. Version: 1.3.8 / 1.2.5. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$connection_requests variable (HTTP)$connection_requests
Request count on the current connection. Useful to observe connection reuse; do not interpret as total server traffic. Version: 1.3.8 / 1.2.5. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$connection_time variable (HTTP)$connection_time
Elapsed connection lifetime in seconds with subsecond precision; contrasts with per-request latency. Version: 1.19.10. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$content_length variable (HTTP)$content_length
Value of the incoming Content-Length field, when present. Its absence is not proof of an empty body; distinguish framing from application-level size checks. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$content_type variable (HTTP)$content_type
Incoming Content-Type field; clients can claim any media type. Validate actual application payload independently. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$cookie_* variable family (HTTP)$cookie_*
Extract a named incoming cookie, such as $cookie_theme. A cookie is client-controlled and may carry private data; use synthetic preferences only. The asterisk represents a name suffix, not literal configuration syntax. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$document_root variable (HTTP)$document_root
Configured root or alias value for the active request. This is a directory or mapping expression result, not necessarily the complete requested file name. Avoid exposing filesystem paths. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$document_uri variable (HTTP)$document_uri
Alias of $uri; reflects the current normalized URI rather than the unchanged original request target. Internal routing can change it. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$host variable (HTTP)$host
Effective host name selected from request target, Host field or matching server name in that order. Not proof of identity.
$hostname variable (HTTP)$hostname
Host name of the machine running Nginx. Useful in synthetic instance diagnostics; avoid exposing infrastructure identity publicly. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
$http_* variable family (HTTP)$http_*
Read an incoming header using its lowercase name with hyphens mapped to underscores, for example $http_x_lab_color. Missing fields may yield an empty value; client input is not proof of identity. The existing $http_host entry remains a specific example. The asterisk represents a name suffix, not literal configuration syntax. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.

HTTP stub status variables

1 entry

Variables

1 entry

Showing 20 of 531 entries