运营狗 - 通配符SSL https://blog.seo135.com/tag/%E9%80%9A%E9%85%8D%E7%AC%A6SSL/ 宝塔免费申请通配符SSL证书教程(泛域名SSL) https://blog.seo135.com/603.html 2019-07-19T18:29:00+08:00 Let’s Encrypt官方在2018年上线泛域名免费SSL证书。下面是SEOGO申请泛域名证书的操作过程。一、安装依赖程序首先登陆ssh,根据自己服务器系统选择下面命令安装依赖程序。1、Centosyum update && yum install curl -y && yum install cron -y && yum install socat -y2、Debian/Ubuntuapt-get update && apt-get install curl -y && apt-get install cron -y && apt-get install socat -y二、下载ACME.SHcurl https://get.acme.sh | sh三、获取域名API1、如果是阿里云域名,获取阿里云域名Access Key ID和Access Key SecreAccess Key ID、Access Key Secre申请地址回到服务器执行以下命令,export Ali_Key为Access Key ID,export Ali_Secret为Access Key Secre。export Ali_Key="abcdef" export Ali_Secret="abcdefh8Hs5BHs5BHs5B"创建Access Key ID和Access Key Secre后需要注意,弹出的窗口显示完整的“Token”,并且只显示这一次,所以请一定复制保存好。2、如果是腾讯域名,获取域名API域名API申请地址回到服务器执行以下命令,DP_Id=""中请填写你的ID,DP_Key=""中请填写Token。export DP_Id="1234" export DP_Key="abcdefg"创建API后需要注意,弹出的窗口显示完整的“Token”,并且只显示这一次,所以请一定复制保存好。四、申请证书输入下面命令申请免费SSL证书。其中代码中的 demo.com 请改成你自己的域名。~/.acme.sh/acme.sh --issue --dns dns_ali -d demo.com -d *.demo.com出现下面这几行表示成功,以下几行表示SSL证书路径,访问这些目录找到证书后,在宝塔面板里面配置SSL即可。[Fri Jul 19 16:53:14 CST 2019] Your cert is in /www/server/panel/vhost/cert/demo.com/demo.com.cer [Fri Jul 19 16:53:14 CST 2019] Your cert key is in /www/server/panel/vhost/cert/demo.com/demo.com.key [Fri Jul 19 16:53:14 CST 2019] The intermediate CA cert is in /www/server/panel/vhost/cert/demo.com/ca.cer [Fri Jul 19 16:53:14 CST 2019] And the full chain certs is there: /www/server/panel/vhost/cert/demo.com/fullchain.cer完成。