HTTP variables

$proxy_protocol_server_port variable (HTTP)

Destination port reported by the trusted PROXY header, not necessarily the local listener port. Requires matching listener framing. Version: 1.17.6. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.

Formal Syntax & Structure

nginx syntaxnginx
$proxy_protocol_server_port

Working Example

Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_proxy_protocol_server_port escape=json '{"observed":"$proxy_protocol_server_port"}';
Nginx Reference