网站安装SSL后,HTTPS绑定后无法指定主机头

来源:本站原创 点击数: 发布时间:2021年12月09日

首先停止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。