修改nginx配置文件,如下:
location /yamiShop {
proxy_pass http://127.0.0.1:8085/yamiShop;
#添加以下代码即可
proxy_redirect http:// $scheme://;
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_set_header X-Scheme $scheme;
proxy_set_header WL-Proxy-SSL true; #weblogic启效,告诉weblogic原始协议
proxy_set_header X-Forwarded-Proto https; #tomcat启效,告诉tomcat原始协议
}