技术解析
nginx 配置
症状:
# proxy_set_header Host www.example.com;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
加上配置后 nginx 日志:
x8.x7.xx6.xx7 - - [19/Dec/2016:15:45:13 +0000] "GET /articles/20161116173635141 HTTP/1.1" 404 0 "https://www.example.com/"国外服务器 "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"
上面配置的目的是想后端拿到正确的 IP 地址 , 不知道哪里配置出了问题 , 请大神们指教下, 谢谢了....