在配置的http 的server中 加入
return 301 https://www.xxx.cn$request_uri;
server{
listen 80;
server_name www.linuotech.cn;
#这里是过滤请求,/是所有请求都可以
return 301 https://www.xxx.cn$request_uri;
location /{
proxy_pass http://xxx;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}