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