标签:
proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
http://stderr.net/apache/rpaf/
# if DSO load module first: LoadModule rpaf_module libexec/apache2/mod_rpaf-2.0.so RPAFenable On RPAFsethostname On RPAFproxy_ips 192.168.1.23 (nginx loadblance server) RPAFheader X-Forwarded-For |
--with-http_realip_module
set_real_ip_from 192.168.2.1;(该ip为nginx loadblance ip) real_ip_header X-Real-IP;
context为: http, server, location
更多,查看:
关于nginx做负载均衡时backend server取real ip
标签:
原文地址:http://www.cnblogs.com/ivyer/p/5029402.html