这两部分内容可见之前学习tomcat时的博客https://blog.csdn.net/u011943534/article/details/103774401
反向代理导致了后端服务器的IP,为前端服务器的IP,而不是客户真正的IP。解决此问题,需要在location中加入header设置
location xxx {
proxy_set_header X-Forwarded-For $remote_addr
proxy_pass xxxx
}
这两部分内容可见之前学习tomcat时的博客https://blog.csdn.net/u011943534/article/details/103774401
反向代理导致了后端服务器的IP,为前端服务器的IP,而不是客户真正的IP。解决此问题,需要在location中加入header设置
location xxx {
proxy_set_header X-Forwarded-For $remote_addr
proxy_pass xxxx
}