在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux/ NGINX upstream 后端服務(wù)器怎么使用負載均衡器域名

NGINX upstream 后端服務(wù)器怎么使用負載均衡器域名

upstream source {
   server 192.168.28.129:80 weight=1 max_fails=2 fail_timeout=30s;
   server 192.168.28.130:80 weight=1 max_fails=2 fail_timeout=30s;
}

server {
        listen       80;
        server_name  down1.example.com;
        location /source {
           root html;
           index index.html index.htm;
           proxy_pass http://source/;
           proxy_set_header Host $host;
           proxy_set_header Cookie $http_cookie;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header X-Forwarded-Proto $scheme;
           client_max_body_size 300m;
        }
}

192.168.28.129,192.168.28.130 為兩臺下載機的IP,現(xiàn)在下載地址直接是192.168.28.129,130 怎么操作能讓這個兩個IP變?yōu)橛蛎?/p>

回答
編輯回答
青裙

修改你本地host文件 添加對應(yīng)的dns解析

linux下在/etc/hosts
windows在C:\Windows\System32\drivers\etc\hosts
在里面添加
你的代理服務(wù)器IP example.com
2017年8月29日 07:35