nginx反向代理的重定向

bi.kailinjt.com.conf 
server {
        listen       80;
        server_name  bi.kailinjt.com;

        location = / {
                        return 302 $scheme://$host/webroot/login.html;
                }
        location / {
                #return 302 $scheme://$host/webroot/login.html;
                proxy_pass http://10.10.3.37:8080;
                proxy_redirect          $scheme://$host/ $scheme://$host/webroot/login.html;
                proxy_set_header        Host            $http_host;
                proxy_set_header        X-Real-IP       $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Scheme        $scheme;
                proxy_buffer_size 64k;
                proxy_buffers   4 32k;
                proxy_busy_buffers_size 64k;
        }
}
posted @ 2023-11-02 10:15  Gshelldon  阅读(88)  评论(0编辑  收藏  举报