我的tomcat应用程序没有被nginx调用。
Tomcat App工作正常:http://localhost:8080/web/
Nginx网址:http://localhost/web
nginx配置:
location /web {
proxy_pass http://localhost:8080/web;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
答案 0 :(得分:2)
我认为它会是这样的:
location /web {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;
}