isso+leancloud切换https"/>
jekyll+isso+leancloud切换https
前言
之前jekyll+isso使用的http协议,现在将jekyll切到https之后,发现不显示isso评论了,google一阵子之后,发现原来https的网页内如果再去请示http的资源(例如js文件)会失败。所以又不得不想办法把isso也改成https服务。这里记录一下修改步骤。
ISSO配置修改
- host添加https名单
- public-endpoint改为https协议(nginx代理的URL)
[general]
dbpath = /var/lib/isso/comments.db
host =://www.ferrisyu/[server]
listen = http://localhost:8090/
public-endpoint = :7000/isso
nginx配置修改
申请免费证书参考链接:用 Certbot 一键升级你的网站为 Https
自动更新证书参考链接:手把手教你在Nginx上使用CertBot
根据上面的链接指导,只要几条命令就可以自动升级到https
# 安装certbot
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx# 升级到https
sudo certbot --nginx# 配置自动更新
sudo crontab -e
# 添加配置
30 2 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log
jekyll修改
- _config.yml中将url改成https
- 搜索整个目录,使用http指向的本站图片、链接都改成https,一般写博客都是写的"/XXX/xxx/1.jpg",不需要指定协议,所以基本不用改。
- 将访问ISSO接口的URL改成https
leancloud
添加https域名白名单
更多推荐
jekyll+isso+leancloud切换https
发布评论