标签:
location / project
{
proxy_pass http://localhost:8081/project;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
proxy_set_header Host $host:$server_port; 这行配置是关键.这行配置是让转发带上端口.
加上这行以后就可以顺利访问了
标签:
原文地址:http://my.oschina.net/hanjiafu/blog/492019