NginX 常用配置
强制https
# 在监听80端口的server配置上进行return 301
server {
listen 80;
server_name your.domain;
return 301 https://$server_name$request_uri;
}
# 在监听80端口的server配置上进行return 301
server {
listen 80;
server_name your.domain;
return 301 https://$server_name$request_uri;
}