listen 80;
listen 443 ssl http2;
server_name monkeypwr.cn www.monkeypwr.cn;
index index.php index.html index.htm default.php default.htm default.html;
root /www/monkey/monkeypwr.cn/monkey_web;
#CERT-APPLY-CHECK--START
# 用于SSL证书申请时的文件验证相关配置 -- 请勿删除
include /www/server/panel/vhost/nginx/well-known/monkeypwr.cn.conf;
#CERT-APPLY-CHECK--END
#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
#HTTP_TO_HTTPS_START
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
相关nginx配置 |