Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security 添加SSL证书后需要键入https://awlays_Security_Ssl_Iis_Windows Server 2016_Iis 10 - Fatal编程技术网

Security 添加SSL证书后需要键入https://awlays

Security 添加SSL证书后需要键入https://awlays,security,ssl,iis,windows-server-2016,iis-10,Security,Ssl,Iis,Windows Server 2016,Iis 10,我从某家公司购买了SSL证书,并将其安装在我的Windows 2016服务器IIS 10上。其绑定如下图所示 当我打字时,它工作得很好。。。但当我只键入example.com时,它就会转到IIS默认站点。以及当我键入时,它工作正常,但当我只键入www.example.com时,它将转到默认的IIS站点。 这意味着当我键入https://时,它可以正常工作。。。但通常用户键入example.com或www.example.com。。 那么,我如何配置这一个来满足上述要求呢?这正是当前站点绑定的结

我从某家公司购买了SSL证书,并将其安装在我的Windows 2016服务器IIS 10上。其绑定如下图所示

当我打字时,它工作得很好。。。但当我只键入example.com时,它就会转到IIS默认站点。以及当我键入时,它工作正常,但当我只键入www.example.com时,它将转到默认的IIS站点。

这意味着当我键入https://时,它可以正常工作。。。但通常用户键入example.com或www.example.com。。
那么,我如何配置这一个来满足上述要求呢?

这正是当前站点绑定的结果

所以我的建议是,

  • 将HTTP绑定添加回该站点,以便此站点(而不是默认网站)可以处理和
  • 安装URL重写模块,然后添加一个或多个规则以将HTTP通信重定向到HTTPS。互联网上有大量关于这方面的文章/帖子

  • 这正是当前站点绑定的结果

    所以我的建议是,

  • 将HTTP绑定添加回该站点,以便此站点(而不是默认网站)可以处理和
  • 安装URL重写模块,然后添加一个或多个规则以将HTTP通信重定向到HTTPS。互联网上有大量关于这方面的文章/帖子

  • 当您在web浏览器中键入example.com或www.example.com时,客户端将只通过http而不是类似https的方式发送请求

    由于您的网站需要https,因此将检查是否需要SSL。不能在同一站点下同时承载http和https绑定。否则,要求SSL握手将损坏URL重定向规则

    请安装URL重写模块并将此规则置于默认网站下

     <rule name="HTTPS force" enabled="true" stopProcessing="true">
     <match url="(.*)" />
     <conditions>
     <add input="{HTTPS}" pattern="^OFF$" />
     </conditions>
     <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
     </rule>
    

    当您在web浏览器中键入example.com或www.example.com时,客户端将通过http而不是类似https的方式发送请求

    由于您的网站需要https,因此将检查是否需要SSL。不能在同一站点下同时承载http和https绑定。否则,要求SSL握手将损坏URL重定向规则

    请安装URL重写模块并将此规则置于默认网站下

     <rule name="HTTPS force" enabled="true" stopProcessing="true">
     <match url="(.*)" />
     <conditions>
     <add input="{HTTPS}" pattern="^OFF$" />
     </conditions>
     <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
     </rule>