upstream site {
server xx.xx.xx.185:33084 max_fails=20 fail_timeout=1;
server xx.xx.xx.96:33084 max_fails=20 fail_timeout=1;
server xx.xx.xx.94:7070 max_fails=20 fail_timeout=1;
serverxx.xx.xx.167:7070 max_fails=20 fail_timeout=1;
}
server {
server_name site.loc;
listen 80;
access_log /opt/nginx/logs/now/site.access.log;
error_log /opt/nginx/logs/site.error.log error;
location / {
proxy_pass http://site;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Request-Id $request_id;
proxy_read_timeout 3s;
proxy_send_timeout 3s;
proxy_next_upstream error http_502 http_500 http_503 http_504 timeout;
}
}