real_ip_header

Syntax: real_ip_header field | X-Real-IP | X-Forwarded-For | proxy_protocol;
Default: real_ip_header X-Real-IP;
Context: http, server, location

Defines the request header field whose value will be used to replace the client address.

The X-Real-IP and X-Forwarded-For parameters may contain an optional port (1.11.0). The address and port should be specified according to RFC 3986.

The proxy_protocol parameter (1.5.12) changes the client address to the one from the PROXY protocol header. The PROXY protocol must be previously enabled by setting the proxy_protocol parameter in the listen directive.

doc_nginx
2017-02-09 07:08:41
Comments
Leave a Comment

Please login to continue.