使用letsencrypt给服务器添加https证书

直接进入官网: Certbot | Certbot

选择对应的操作系统, 根据文档操作即可.

2021-12-06 ubuntu20 云服务器 亲测可行

which snap || (sudo apt update && sudo apt install snapd)
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot --nginx

---------------------------------------------------------

Before 2021/12/06

以下命令摘自该官网, Ubuntu18+nginx下亲测可行:(其他系统的请自行上官网查看对应安装方法)

sudo apt-get update
sudo apt-get install -y snap
sudo snap install --classic certbot
sudo certbot --nginx
sudo certbot renew --dry-run

如果报snap not found 就这样:

sudo apt install snapd

------------------------------------------------------------------------------------以下是旧的内容, 缺点是配完需要手动启动定时任务更新证书

Can not be more simple, 简单得不能再简单的,letsencrypt——只需一行代码:

git clone https://github.com/certbot/certbot.git && ./certbot/letsencrypt-auto

然后根据提示操作即可

以上是我个人的成功经验,官网的方法是:| Certbot

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值