Certbot 申請 Let's Encrypt 泛域名證書 用於Windows IIS
阿新 • • 發佈:2020-06-06
因為Windows平臺,所以先用的 win-acme,一直驗證不過。換虛擬機器用 Certbot 申請,再轉成 IIS 支援格式。
Homestead 安裝 Certbot
sudo su add-apt-repository ppa:certbot/certbot apt update apt install certbot
使用以下命令確認已安裝的Certbot版本:
certbot --version
Certbot 申請泛域名證書 手動驗證
certbot certonly --preferred-challenges dns --manual -d *.baidu.com --server https://acme-v02.api.letsencrypt.org/directory
引數:
--preferred-challenges dns: 認證方式選擇DNS,泛域名支援DNS
--manual: 手動驗證模式
-d *.baidu.com: 就是要申請的泛域名了
--server https://acme-v02.api.letsencrypt.org/directory: 泛域名證書是新功能,如果要使用就得加上這個引數
PEM 格式轉為 PFX 格式
openssl pkcs12 -export -out baidu_combined.pfx -in fullchain.pem -inkey privkey.pem
IIS 匯入證書
匯入證書後,在相應站點 - 編輯繫結
選剛匯入的證書。
引用:
https://www.jianshu.com/p/1eb7060c5ede
https://www.helplib.cn/beryl/install-letsencrypt-ubuntu