免费泛域名申请以及无限续期
在Ubuntu 20.04上,使用certbot和snapd安装Let's Encrypt证书以实现免费泛域名(如`*.example.com`)的无限续期。首先安装snapd,然后卸载并安装certbot,创建certbot软连接。设置trust-plugin-with-root,安装certbot-dns-cloudflare插件,配置Cloudflare API token。通过certbot certonly命令获取证书,包括子域名,并设置自动续期。将证书导入nginx并验证。最后,创建post-renewal hook以在续期后自动重启nginx。