certbot
certbot的前身是Let’s Encrypt,工具后改名为cerbot,用于生成https证书加密网站。
如果你拥有一个域名指向的主机,可以通过certbot配置https。
配置主机
需要打开80与443防火墙,服务器安装个nginx方便自动配置
下载源码
直接从github上下载certbot工具
1 | git clone https://github.com/certbot/certbot.git |
生成证书
使用命令 ./certbot-auto -d youdomain
根据提示选择,之后自动在你nginx增加了https配置,建议将http强制跳转到https。
后面就可以愉快地玩耍了。