nginx 端口映射多个应用
nginx端口映射多个应用,应用中的静态资源路径尽量是写相对路径
server {
listen 8000;
location / {
proxy_pass http://10.1.166.216:9999/;
index index.html index.htm;
}
location /cdh {
proxy_pass http://10.1.166.113:4690/;
index index.html login.html;
}
location /tomcat {
proxy_pass http://10.1.166.171:8080/;
index index.html index.htm;
}
}
参考文档:1.https://blog.csdn.net/qq_27384769/article/details/78545560