upstream www_data_cn {
ip_hash;
server 172.16.15.138:8180 weight=3 max_fails=3 fail_timeout=10s;
server 172.16.15.138:8080 weight=1 max_fails=3 fail_timeout=10s;
server 172.16.15.137:8180 weight=3 max_fails=3 fail_timeout=10s;
server 172.16.15.137:8080 weight=1 max_fails=3 fail_timeout=10s;
}
重启nginx时 报错
Restarting nginx: nginx: [emerg] invalid parameter "weight=3" in /etc/nginx/nginx.conf:72
nginx: configuration file /etc/nginx/nginx.conf test failed
不设置weight 就可以通过,不知道为什么