IIS7 https無(wú)法綁定主機(jī)頭,顯示灰色
據(jù)了解,IIS7下面默認(rèn)HTTPS綁定是無(wú)法指定主機(jī)頭的,但我們可以通過(guò)手工修改IIS配置來(lái)實(shí)現(xiàn)主機(jī)頭綁定。
打開(kāi)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.22.cn" /> </bindings>
找到https的配置項(xiàng)目行,修改為:
<binding protocol="https" bindingInformation="*:443:www.www.22.cn" />
注意這里的www.22.cn要換成你自己的域名,之后保存即可。