nginx proxy反向代理增加后端服务器获取hostname,servername
server
{
listen 80;
server_name *.iamle.com;

location / {
proxy_pass http://10.96.1.104/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#这句就是给后端增加hostname 获取。
proxy_set_header Host $host;
}
}