set_real_ip_from --how to load IP list file ?
416626442 at qq.com
Sun Nov 8 06:47:03 UTC 2015
I'm using CDN with my site.
There are many IPs on network.
set_real_ip_from only can add IP in one line.
I want to add IP list to file and load it .
How to set ?
PS: Apache Module mod_remoteip have RemoteIPTrustedProxyList for this.
But I just want to use nginx.
Description:Declare client intranet IP addresses trusted to present the RemoteIPHeader value
Context:server config, virtual host
The RemoteIPTrustedProxyList directive specifies a file parsed at startup, and builds a list of addresses (or address blocks) to trust as presenting a valid RemoteIPHeader value of the useragent IP.
The '#' hash character designates a comment line, otherwise each whitespace or newline separated entry is processed identically to the RemoteIPTrustedProxy directive.
Trusted (Load Balancer) Example
RemoteIPHeader X-Forwarded-For RemoteIPTrustedProxyList conf/trusted-proxies.lst
# Identified external proxies;
192.0.2.16/28 #wap phone group of proxies
proxy.isp.example.com #some well known ISP
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx