当nginx与tomcat安装完成后(可以通过 ip地址:8080/项目名/ 访问项目主页)
打开nginx.conf
listen 80;
#server_name 域名
server_name xxx;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#这两行加注释
#root html;
#index index.html index.htm;
proxy_pass http://自己的ip地址:8080/test/;
}
我这样就成了,仅限参考。