java获取获取不到服务器ip nginx代理 tomcat
upstream tomcat.servers {
server 121.43.121.194:8080;
}
location / {
proxy_pass
http://tomcat.servers
;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
配置得有问题吗,还有什么地方需要配置吗?
传说D萌派
10 years, 2 months ago