HTTP variables

$upstream_addr variable (HTTP)

Upstream address or Unix socket path. Multiple attempts and group transitions can produce a list; a failed selection can report a group name. Use after upstream processing, not as an assumed single IP.

Formal Syntax & Structure

nginx syntaxnginx
$upstream_addr

Working Example

Example Snippetnginx
log_format backend_address escape=json '{"upstream":"$upstream_addr"}';
Nginx Reference