Nginx redirect page jump forward

Brief introduction

Nginx reverse proxy process, we will not be found by redirecting the URL when jumping, because often there is no port Host header configuration, you need the following as part of the standard red configure the port number.

After adding only Host redirect, there would be no port number.

Program

location / {
        proxy_pass        http://xsk;        
        client_max_body_size  500m;  
        proxy_set_header Host $host:5003;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Real-Port $remote_port;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_connect_timeout   300000;    
        proxy_send_timeout      600000;        
        proxy_read_timeout      600000;
    }

 

Guess you like

Origin www.cnblogs.com/xiangsikai/p/12010113.html