server {
listen 80;
server_name www.server110.com;
location / {
proxy_pass http://1.2.3.4; //后端ip地址
proxy_redirect off; //关闭后端返回的header修改
proxy_set_header Host $host; //修改发送到后端的header的host
proxy_set_header X-Real-IP $remote_addr; //设置真实ip
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}