nginx中proxy_set_header Host $host的作用及$proxy_host,$host与$http_host的区别

一、nginx中proxy_set_header Host $host的作用

nginx为了实现反向代理的需求而增加了一个ngx_http_proxy_module模块。其中proxy_set_header指令就是该模块需要读取的配置文件。在这里,所有设置的值的含义和http请求体中的含义完全相同,除了Host外还有X-Forward-For。

继续阅读“nginx中proxy_set_header Host $host的作用及$proxy_host,$host与$http_host的区别”