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;
}
相关文章
相关标签/搜索