首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

nginx反向代理中proxy_set_header 运维笔记

Nginx proxy_set_header:即允许重新定义或添加字段传递给代理服务器的请求头。该值可以包含文本、变量和它们的组合。在没有定义proxy_set_header时会继承之前定义的值。...默认情况下,只有两个字段被重定义: proxy_set_header Host $proxy_host; proxy_set_header Connection close; 如果启用缓存,来自之前请求的头字段...Host变量,将需传递值赋给Host变量 proxy_set_header Host $host; 此外,服务器名称和端口一起通过代理服务器传递 proxy_set_header Host...$host:$proxy_port; 如果请求头的存在空的字段将不会通过代理服务器传递出去 proxy_set_header Accept-Encoding ""; 简而言之,proxy_set_header...Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST

16K70
领券