Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

set_real_ip_from --how to load IP list file ? (3 replies)

$
0
0
Hi,
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.


http://httpd.apache.org/docs/2.4/mod/mod_remoteip.html

RemoteIPTrustedProxyList Directive
Description:Declare client intranet IP addresses trusted to present the RemoteIPHeader value
Syntax:RemoteIPTrustedProxyList filename
Context:server config, virtual host
Status:Base
Module:mod_remoteip

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

conf/trusted-proxies.lst contents

# Identified external proxies;
192.0.2.16/28 #wap phone group of proxies
proxy.isp.example.com #some well known ISP_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>