使用 Let's Encrypt 通配符证书
一直在使用 Let’s Encrypt 的免费 SSL 证书,但是一直没做笔记。今天看到 Let’s Encrypt 支持了通配符证书(Wildcard Certificates),也就是说二级子域名和主域名可以共用一个证书。 申请证书 # 下载证书申请客户端 cd /opt git clone https://github.com/certbot/certbot cd /opt/certbot # 注意通配符并不包含主域名,所以要配置两个 ./certbot-auto certonly -d *.zyf.im -d zyf.im --manual --preferred-challenges dns --server "https://acme-v02.api.letsencrypt.org/directory" -preferred-challenges dns 使用 DNS 方式校验域名所有权,所以会遇到: ------------------------------------------------------------------------------- Please deploy a DNS TXT record under the name _acme-challenge.zyf.im with the following value: YZ2unEViXH8nYZ2unEViIbW52LhIEViIbW52Lh Before continuing, verify the record is deployed. ------------------------------------------------------------------------------- Press Enter to Continue 要在域名服务商那里将 _acme-challenge.zyf.im 配置 DNS TXT 记录,从而校验域名所有权。 ...