1、下载certbot-auto,请大家自行百度 2、通过修改dns记录的方式申请证书 sudo certbot-auto certonly --manual --preferred-challenge dns -d www.xxx.com(www.xxx.com替换成自己的域名) 执行完上述命令后,会告知你会记录你的IP,选择Y 信息如下: NOTE: The IP of this machine will be publicly logged as having requested this certificate. If you're running certbot in manual mode on a machine that is not your server, please ensure you're okay with that. Are you OK with your IP being logged? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y(这里选择Yes) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3、接着会出现一个提示,要你把_acme-challenge.www.xxx.com(www.xxx.com替换成自己的域名) 设置成TXT记录,值也会写出来,设置好以后等待生效回车即可。 Please deploy a DNS TXT record under the name _acme-challenge.www.xxx.com with the following value: cDU9sWXtOvhjjTOIgCOd4ub3KgDm-Cv-lkB68YIXiUE Before continuing, verify the record is deployed. 阿里云设置txt记录操作如下:
最后将生成的证书替换掉自己的证书就可