nginx配置ip轉發,實現cookie共享:
1.找到nginx.conf配置文件
2.添加配置
proxy_set_header HOST $host; #域名轉發
proxy_set_header X-Real-IP $remote_addr; #IP轉發
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
nginx配置ip轉發,實現cookie共享:
1.找到nginx.conf配置文件
2.添加配置
proxy_set_header HOST $host; #域名轉發
proxy_set_header X-Real-IP $remote_addr; #IP轉發
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;