标签:
http {
#指定接收来自哪个前端发送的 IP head 可以是单个IP或者IP段
set_real_ip_from 10.168.38.0/24;
set_real_ip_from 10.132.44.0/24;
#此指令设置了IP地址头转发替换使用
real_ip_header X-Forwarded-For;
location ^~ /wdzjnews/ {
proxy_pass http://wdzjnews;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
标签:
原文地址:http://www.cnblogs.com/zenghui940/p/4244537.html