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

 

posted @ 2019-01-07 16:15  酸奶加绿茶  阅读(4227)  评论(0编辑  收藏  举报