192.
創(chuàng)新互聯(lián)是一家專業(yè)提供
鼎城企業(yè)網(wǎng)站建設(shè),專注與成都做網(wǎng)站、網(wǎng)站建設(shè)、
外貿(mào)營(yíng)銷網(wǎng)站建設(shè)、
H5技術(shù)、小程序制作等業(yè)務(wù)。10年已為鼎城眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站設(shè)計(jì)公司優(yōu)惠進(jìn)行中。168.169.123 8081端口 代理 http://192.168.169.191
192.168.169.123 8082端口 代理 http://192.168.169.192
配置文件:
server{
listen 8081;
server_name localhost;
location /{
# root html;
# index index.html index.html iisstart.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://192.168.169.191/;
}
}
server{
listen 8082;
server_name localhost;
location /{
# root html;
# index index.html index.html iisstart.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://192.168.169.192/;
}
}
負(fù)載均衡配置
upstream js {
server 192.168.169.191:80 weight=1;
server 192.168.169.192:80 weight=1;
}
server{
listen 8090;
server_name js;
location / {
proxy_pass http://js;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
upstream js {
server 192.168.169.191:80 weight=1;
server 192.168.169.192:80 weight=1;
}
server{
listen 8090;
server_name js;
location / {
proxy_pass http://js;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
分享名稱:nginx代理設(shè)置-創(chuàng)新互聯(lián)
網(wǎng)站URL:
http://weahome.cn/article/doichg.html