# HTTPSserver { listen 443 ssl http2; listen [::]:443 ssl http2; # https ssl ssl_certificate ssl/3889414_hook.lmsite.cn.pem; ssl_certificate_key ssl/3889414_hook.lmsite.cn.key; include ssl/ssl_config.conf; server_name hook.lmsite.cn www.hook.lmsite.cn; access_log /data/weblogs/hook.lmsite.cn_nginx.log combined; # 代理 spug location / { include proxy_set_header.conf; proxy_pass http://127.0.0.1:8266; } # 限制访问的文件 location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) { deny all; }}# http rewrite httpsserver { listen 80; listen [::]:80; server_name hook.lmsite.cn www.hook.lmsite.cn; rewrite ^(.*)$ https://${server_name}$1 permanent;}