Nginx記錄-Proxy_pass多個應用配置(轉載)
阿新 • • 發佈:2021-12-20
Nginx記錄-Proxy_pass多個應用配置(轉載)
1. 在http節點下,加入upstream節點。
upstream linuxidc {
server 10.0.6.108:7080;
server 10.0.0.85:8980;
}
2. 將server節點下的location節點中的proxy_pass配置為:http:// + upstream名稱,即“
http://linuxidc”.
location / {
root html;
index index.html index.htm;
proxy_pass http://linuxidc;
}
###################################################
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;
}
}
為人:謙遜、激情、博學、審問、慎思、明辨、 篤行 學問:紙上得來終覺淺,絕知此事要躬行
為事:工欲善其事,必先利其器。
態度:道阻且長,行則將至;行而不輟,未來可期
轉載請標註出處!