IIS7下面默認HTTPS綁定是無法指定主機頭的,我們可以通過手工修改IIS配置來實現主機頭綁定。
首先停止IIS服務。
然后打開C:/Windows/system32/inetsrv/config/applicationHost.config
搜索你的站點名稱找到類似下面的配置項,做相應修改:
<site name="Web01" id="3">
<application path="/" applicationPool="Web01">
<virtualDirectory path="/" physicalPath="E:/Web/Web01" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:80:web1.web.com" />
<binding protocol="https" bindingInformation="*:443:" />
</bindings>
</site>
找到https的配置項目,修改為:
<binding protocol="https" bindingInformation="*:443:web1.web.com" />
在443后面增加你的域名,保存。
再次啟動IIS,OK。
轉:http://blog.csdn.net/zhangking/article/details/6347400