#...
upstream backproxy_name {
server XXXX.com:80;
#...
}
server {
listen 80;
server_name mydomain.com;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://backproxy_name; #前面取的别名
proxy_set_header x-real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
网友评论