nginx配置ip轉發,實現cookie共享

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;

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章