洞悉互聯網前沿資訊,探尋網站營銷規律
作者:狐靈科技 | 2020-01-02 09:55 |點擊:
Let’s Encrypt官方在2018年上線泛域名免費SSL證書。下面是SEOGO申請泛域名證書的操作過程。
首先登陸ssh,根據自己服務器系統選擇下面命令安裝依賴程序。
1、Centos
yum update && yum install curl -y && yum install cron -y && yum install socat -y
2、Debian/Ubuntu
apt-get update && apt-get install curl -y && apt-get install cron -y && apt-get install socat -y
curl https://get.acme.sh | sh
1、如果是阿里云域名,獲取阿里云域名Access Key ID和Access Key Secre
Access 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
回到服務器執行以下命令,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 |
完成。
原文鏈接:https://www.seogo.me/tec/603.html