打开nginx当前站点的配置文件,如paht/to/nginx/conf.d/test.conf,添加多一个80端口的server
server { listen 80; server_name tytrock.com ; return 301 https://$server_name$request_uri; } server { listen 443; server_name tytrock.com; ... ... }
本帖已被设为精华帖!
打开nginx当前站点的配置文件,如paht/to/nginx/conf.d/test.conf,添加多一个80端口的server
server { listen 80; server_name tytrock.com ; return 301 https://$server_name$request_uri; } server { listen 443; server_name tytrock.com; ... ... }