Manually install an SSL certificate on my IIS 10 server

Steven · 2023-02-07 23:02 · 58 views · Windows · old id 125

Convert your .crt file to a .cer file

  1. Locate your downloaded .crt file, and double-click to open it.
  2. Select the Details tab, and then the Copy to File button.
  3. Select Next in the Certificate Wizard.
  4. Select Base-64 encoded X.509(.CER) and then select Next.
  5. Select Browse, locate where you want to save your .CER file, and type in a name for your certificate.
  6. Select Next and then Finished.

Copy your certificate files onto the server

  1. Find the directory on your server where certificate and key files are stored, then upload your intermediate certificate (gd_iis_intermediates.p7b or similar) and primary certificate (.cer file that you just converted) into that folder.

Add a Certificate Snap-in to the Microsoft Management Console (MMC)

  1. Click on your Start Menu, then click Run.
  2. In the prompt, type mmc and click OK.
  3. Click File, then click Add/Remove Snap-in.
  4. On the new window, click the Add button.
  5. On the new window, select Certificates and click Add.
  6. Select Computer account for the snap-in and click Next.
  7. Click Local computer and click Finish.
  8. Click Close on the Add Standalone Snap-in window.
  9. Click OK on the Add/Remove Snap-in window.

Import the Intermediate SSL Certificate

  1. In the MCC Console, click ▸ to expand Certificates (Local Computer).
  2. Right click on the Intermediate Certification Authorities folder, hover over All Tasks and click Import.
  3. On the new window, click Next.
  4. Click Browse, find your gd_iis_intermediates.p7b intermediate certificate file and click Open.
  5. Click Next, verify that the certificate information is proper and click Finish.
  6. Close the the import was successful notification.

Install your SSL certificate

  1. Click on your Start Menu, then click Run.
  2. In the prompt, type inetmgr and click OK to launch the Internet Information Services (IIS) Manager.
  3. Under the Connections panel on the left, click on your Server Name.
  4. In the main panel under the IIS section, double click on Server Certificates.
  5. Under the Actions panel on the right, click Complete Certificate Request.
  6. On the new window, click ... to browse, find your previously uploaded primary certificate file and click Open.
  7. Add a Friendly name to easily identify this certificate in the future.
  8. In the certificate store option, select Web Hosting and click OK.

Bind the SSL certificate

  1. Under the Connections panel on the left, click ▸ to expand the Sites folder.
  2. Click the Site Name that you plan to install the SSL certificate onto.
  3. Under the Actions panel on the right, find the Edit Site section and click Bindings.
  4. On the new window, click Add and fill out the following information:
    • Type: select https.
    • IP Address: select All Unassigned.
    • Port: type in 443.
    • Host name: leave this empty.
    • SSL Certificate: select your recently installed SSL.
  5. Click OK to confirm, then Close for the Site Bindings window.

Restart IIS

  1. Under the Actions panel on the right, find the Manage Website section and click Restart.

=========================================

将您的 .crt 文件转换为 .cer 文件

  1. 找到下载的 .crt 文件,然后双击打开。
  2. 选择 Details(详细信息)选项卡,然后选择 Copy to File(复制到文件)按钮。
  3. 在证书向导中选择 Next(下一步)。
  4. 选择 Base-64 encoded X.509(.CER)(Base-64 编码的 X.509(.CER)),然后选择 Next(下一步)。
  5. 选择 Browse(浏览),找到要保存 .CER 文件的位置,然后输入证书名称。
  6. 选择 Next(下一步),然后选择 Finished(完成)。

将您的证书文件复制到服务器上

  1. 找到服务器上存储证书和密钥文件的目录,然后将您的中间证书(gd_iis_intermediates.p7b 或类似名称)和主要证书(您刚刚转换的 .cer 文件)上传到该文件夹。

将证书管理单元添加到 Microsoft 管理控制台 (MMC)

  1. 单击 Start Menu(开始菜单),然后单击 Run(运行)。
  2. 在提示框中,键入 mmc,然后单击 OK(确定)。
  3. 依次单击 File(文件)和 Add/Remove Snap-in(添加/移除管理单元)。
  4. 在新窗口上,单击 Add(添加)按钮。
  5. 在新窗口上,选择 Certificates(证书),然后单击 Add(添加)。
  6. 为管理单元选择 Computer account(计算机账户),然后单击 Next(下一步)。
  7. 依次单击 Local computer(本地计算机)和 Finish(完成)。
  8. 单击 Add Standalone Snap-in(添加独立管理单元)窗口上的 Close(关闭)。
  9. 单击 Add/Remove Snap-in(添加/移除管理单元)窗口上的 OK(确定)。

导入中间 SSL 证书

  1. 在 MCC 中,单击 ▸,展开 Certificates (Local Computer)(证书(本地计算机))。
  2. 右键单击 Intermediate Certification Authorities(中间证书签发机构)文件夹,将鼠标悬停在 All Tasks(全部任务)上,然后单击 Import(导入)。
  3. 在新窗口上,单击 Next(下一步)。
  4. 单击 Browse(浏览),找到 gd_iis_intermediates.p7b 中间证书,然后单击 Open(打开)。
  5. 单击 Next(下一步),验证证书信息是否正确并单击 Finish(完成)。
  6. 关闭 the import was successful(导入成功)通知。

安装您的 SSL 证书

  1. 单击 Start Menu(开始菜单),然后单击 Run(运行)。
  2. 在提示框中,键入 inetmgr,然后单击 OK(确定),启动 Internet 信息服务 (IIS) 管理器。
  3. 在左侧的 Connections(连接)面板下方,单击您的 Server Name(服务器名称)。
  4. 在 IIS 分区下方的主面板中,双击 Server Certificates(服务器证书)。
  5. 在右侧的 Actions(操作)面板下方,单击 Complete Certificate Request(完成证书请求)。
  6. 在新窗口上,单击 ...,浏览到您以前上传的主要证书文件,然后单击 Open(打开)。
  7. 添加 Friendly name(易记名称),以便将来轻松识别此证书。
  8. 在 certificate store(证书商店)选项中,选择 Web Hosting(虚拟主机),然后单击 OK(确定)。

绑定 SSL 证书

  1. 在左侧的 Connections(连接)面板下方,单击 ▸,展开 Sites(网站)文件夹。
  2. 单击您计划在之上安装 SSL 证书的 Site Name(网站名称)。
  3. 在右侧的 Actions(操作)面板下方,找到 Edit Site(编辑网站)分区,然后单击 Bindings(绑定)。
  4. 在新窗口上,单击 Add(添加),然后填写以下信息:
    • Type(类型):选择 https。
    • IP Address(IP 地址):选择 All Unassigned(全部未分配)。
    • Port(端口):键入 443。
    • Host name(主机名称):将此项留空。
    • SSL Certificate(SSL 证书):选择最近安装的 SSL。
  5. 单击 OK(确定)进行确认,然后关闭Site Bindings(网站绑定)窗口。

重新启动 IIS

  1. 在右侧的 Actions(操作)面板下方,找到 Manage Website(管理网站)分区,然后单击 Restart(重新启动)。
=================================

以上这个办法 针对通配符证书,需要在IIS申请才可以;

参考 https://www.digicert.com/kb/csr-creation-ssl-installation-iis-10.htm

← Back to home