为什么我通过nginx访问我的服务器时获得了本地地址

时间:2016-10-29 17:43:55

标签: nginx

我非常困惑为什么在访问我的服务器时总是得到我的本地页面。 This is my server nginx.conf

I always get this page.

我的nginx.conf中有错误吗?

1 个答案:

答案 0 :(得分:0)

我通过设置一些标题来解决这个问题。

proxy_set_header Host $host; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;