Let's Encrypt 通配符证书申请

1.获取certbot-auto

wget https://dl.eff.org/certbot-auto

2.添加执行权限

chmod u+x certbot-auto

3.申请证书

sudo ./certbot-auto --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns-01 certonly  -d "*.your-domain.com"

4.添加TXT记录
_acme-challenge.your-domain.com
记录值为:(生成的字符串)

5.可根据以下命令查询TXT记录是否生效

dig _acme-challenge.your-domain.com txt

6.证书生成成功后保存在 /etc/letsencrypt/live/your-domain.com/

7.证书有效期为三个月,重新生成证书命令 certbot-auto renew

猜你喜欢

转载自www.cnblogs.com/marco-tan/p/9026325.html