1,建立網站,選中類型為
https,然後更改SSL證書為你配置的SSL證書
,
對于SSL證書的配置是這樣的
點開第二步,然後點選
建立自簽名證書
确定以後點開網站看到有個SSL,
輕按兩下進去,再選中
要求SSL
選中此步就是為了防止浏覽器認為你的網站不安全阻止網站的通路,到此,證書配置完成
然後發現IIS無法綁定域名,因為IIS7預設不支援HTTPS綁定域名,此時需要自己手動去設定
首先打開
C:\Windows\system32\inetsrv\config\applicationHost.config
在裡面找到
<bindings>
<binding protocol="https" bindingInformation="*:443" />
<binding protocol="net.tcp" bindingInformation="808:*" />
<binding protocol="net.pipe" bindingInformation="*" />
<binding protocol="net.msmq" bindingInformation="localhost" />
<binding protocol="msmq.formatname" bindingInformation="localhost" />
<binding protocol="http" bindingInformation="*:80:www.console.com" />
</bindings>
找到https的配置項目,修改為:
<binding protocol="https" bindingInformation="*:443:www.console.com" />