nginx skips a connection 301

Recently, after the project was upgraded from http to https, the access connection of SMS in the original app used http request, and it is now online. In my nginx, it is judged that if it is all port 301 to https port 443 requested by port 80, but if it is changed at this time, the app needs to be republished. Therefore, the method is to filter this connection and do not jump to 301.

The specific methods are as follows:

Judging if it is not the connection /parking000/00000000Phone4Phone, 301 to https. If it is this connection, continue to execute proxy_pass in location

 

server
{

        listen       80;
#       listen [::]:80;
        server_name www.domain.com;
        access_log /var/log/nginx/listen80;
        if ($document_uri != '/parking000/00000000Phone4Phone'){
                return 301 https://www.domain.com$request_uri;
        }       
        location /parking000/ {
             index  index_tel.jsp index.jsp index.html index.htm *.css;
             proxy_pass http://parking000;
        }
}

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326655035&siteId=291194637
301