与tomcat的nginx无法正常工作

时间:2012-12-18 09:40:09

标签: nginx tomcat7

我的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;            
 }

1 个答案:

答案 0 :(得分:2)

我认为它会是这样的:

location /web {
     proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;            
     proxy_pass         http://localhost:8080;
}