1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| upstream apicluster { server 172.31.20.21 weight=1 max_fails=2 fail_timeout=10s; server 172.31.17.233 weight=1 max_fails=2 fail_timeout=10s; server 172.31.22.225 weight=1 max_fails=2 fail_timeout=10s; }
server { listen 80; server_name xxxx.com;
location / { proxy_pass http://apicluster; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
|