upstream backend {
server 1.1.1.1;
server 2.2.2.2 backup;
}
server {
listen 80;
server_name xx.xx.com;
location / {
set_real_ip_from 3.3.3.3;
set_real_ip_from 3.3.3.5;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://backend;
access_log /data/logs/xx/xx.xx.com.80.log main;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}