现在腾讯提供免费的一年证书,地址:https://console.qcloud.com/ssl
nginx重定向 http 自动跳转 https
server { listen 80; server_name app.typecho.me; index index.html index.htm index.php; rewrite ^/(.*)$ https://plugins.typecho.me/$1 permanent; }
配置ssl证书:
server { listen 443; #listen [::]:80; server_name app.typecho.me; index index.html index.htm index.php; root /app;ssl on; ssl_certificate /ssl/app.typecho.me_cert.crt; ssl_certificate_key /ssl/app.typecho.me.key; include typecho.conf; #error_page 404 /404.html; include enable-php-pathinfo.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /\. { deny all; } access_log off; }</pre>
安装完成。腾讯免费SSL证书+LNMP环境演示:https://app.typecho.me/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。