# 用 ZeroSSL 產生憑證後怎麼安裝到 IIS 上 ###### tags: `IIS` ## 先用 [ZeroSSL](https://app.zerossl.com/dashboard) 生出憑證吧! ## 將憑證轉為 .pfx 檔案,需要使用 OpenSSL.exe > 安裝到 IIS 的憑證必須是 *.pfx 的檔案。但根據申請的管道不同,可能取得的憑證檔案格式不太一樣。 > 如果可以拿到 *.pfx,就可以跳過此步驟。不是的話也沒關係,你拿到的憑證基本上都能產生出 *.pfx 檔案。 > > 例如我從 SSL For Free 申請到的憑證,有以下三個檔案: > > certificate.crt Certificate 文字檔 > private.key Private Key 文字檔 > ca_bundle.crt 中繼憑證文字檔 > 可以透過 OpenSSL 來產生 *.pfx,到 OpenSSL 指令如下: ``` openssl pkcs12 -export -in certificate.crt -inkey private.key -certfile ca_bundle.crt -out sample.pfx ```  ## 匯入 IIS   ## 綁定網域  以上說明皆來自於 [IIS - 安裝 SSL 憑證](https://blog.johnwu.cc/article/iis-install-ssl-certificate.html)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up