nginx 获取实时ip请求地址
修改nginx conf文件夹下 nginx.conf文件,在http{}的配置中,添加如下代码
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
修改nginx conf文件夹下 nginx.conf文件,在http{}的配置中,添加如下代码
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;