使用certbot申请免费泛域名SSL证书
测试环境
- Ubuntu Server 20.04
- 阿里云域名
- cerbot版本1.7.0
其他环境也可以参考cerbot指南https://certbot.eff.org/instructions
预备需求
- 域名
- root权限
详细步骤
-
登录到服务器
-
安装Certbot
sudo apt install certbot
-
获取证书
输入以下命令:
sudo certbot certonly --manual --preferred-challenges=dns
certonly
表示我们只想要获取证书,--manual
表示使用手动方式,--preferred-challenges=dns
表示使用dns挑战(若要使用其他方式,请参考官