location ~ .*.jsp$ { #匹配以jsp结尾的,tomcat的网页文件是以jsp结尾
index index.jsp;
proxy_pass http://127.0.0.1:8080; #主要在这里,设置一个代理
}
这里的127.0.0.1:8080 就是这样填还是填实际的域名啊? 比如http://www.xxx.com:8080?
巴扎黑2017-05-16 13:04:36
访问地址:http://www.xxx.com 配置如下:
server {
listen 80;
server_name www.xxx.com;
access_log logs/xxx.access.log main;
location / {
root html;
index index.html index.htm;
}
location ~ .*.jsp$ { #匹配以jsp结尾的,tomcat的网页文件是以jsp结尾
index index.jsp;
proxy_pass http://127.0.0.1:8080; #主要在这里,设置一个代理
}
}
}