我的配置文件中有以下配置
upstream static {
server server1.dom.com;
server server2.dom.com;
}
server {
listen 80;
server name dom.com;
location ^~ /images/ {
proxy_pass http://static/images/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|xls|flv)$ {
root /var/www;
expires 10d;
}
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
如何更改它以在请求标头中查看上游服务器的主机标头。现在我在 firebug 中只看到 dom.com 主机标头。
请帮忙。:) 有什么建议吗?