一原理
二例子
在 nginx-1.13.0.tar.gz下測試
upstream test {
server 192.168.56.90:8180 weight=1 max_fails=3 fail_timeout=5s;
server 192.168.56.90:8280 weight=1 max_fails=3 fail_timeout=5s;
}
#gzip on;
server {
listen 80;
server_name suibian;
location /tt
{
proxy_pass http://test/t1;
}
}
這兩處地方要相對應,否則出現報錯
測試

訪問了192.168.56.90:8180/t1

訪問了192.168.56.90:8280/t2