Nginx反向代理转发Host设置

    默认情况下反向代理是不会转发请求中的Host头部,如果需要转发,则需要配置红色字体表示的选项参数。

location /t02 {
            proxy_set_header  Host  $host;
            proxy_set_header  X-real-ip $remote_addr;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;

            proxy_pass http://192.168.3.15:9401/t02;
}
原文地址:https://www.cnblogs.com/yshyee/p/7531264.html