1、安装好nginx;
2、配置nginx.conf文件,在此文件中加入你在tompcat下面部署的项目名称以及你想使用的访问方式:
location /app {
proxy_pass http://127.0.0.1:8080/MainServer_app/; (localhost/app/pages/index.html)
}
location / {
proxy_pass http://127.0.0.1:8080/wx/; ((localhost/pages/index.html))
}
3、命令行进入nginx文件下,执行tart nginx命令。
重启的命令行是:nginx -s reload
参考地址:http://www.jb51.net/article/94483.htm