proxy_set_header Host
时间: 2023-08-24 20:06:53 浏览: 89
在Nginx中,proxy_set_header Host用于设置代理请求的目标主机。默认情况下,它的值是$proxy_host,即代理请求的目标主机与代理服务器的主机相同。这意味着代理请求将会转发给与代理服务器相同的主机。此外,还可以使用其他指令来修改Host头部的值,比如使用proxy_set_header X-Forwarded-For来设置客户端的真实IP地址。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Nginx proxy_set_header 解析和延升add_header指令 【转】](https://blog.csdn.net/yangyangye/article/details/126172737)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [nginx反向代理中的proxy_set_header](https://blog.csdn.net/qq_29518275/article/details/100580880)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文