在 applicationHost.config 中将 sslFlags 应用于“/”但虚拟目录中没有任何内容?,authentication,iis,web-config,virtual-directory,default-document"/>

首页 > 解决方案 > 如何做类似的事情在 applicationHost.config 中将 sslFlags 应用于“/”但虚拟目录中没有任何内容?

问题描述

在托管https://example.com的 IIS 10.0 服务器上,我应该在我的 applicationHost.config 中添加什么,以使以下所有内容都成立:

<configuration>
   <location path="">
      <system.webServer>
         <defaultDocument enabled="true">
            <files>
               <add value="index.html" />
            </files>
         </defaultDocument>
         <security>
            <access sslFlags="Ssl, SslNegotiateCert, SslRequireCert, Ssl128">
         </security>
      </system.webServer>
   </location>
   <location path="index.html">
      <system.webServer>
         <security>
            <access sslFlags="Ssl, Ssl128">
         </security>
      </system.webServer>
   </location>
   <location path="/">
      <system.webServer>
         <security>
            <access sslFlags="Ssl, Ssl128">
         </security>
      </system.webServer>
   </location>
</configuration>

不起作用,因为<location path="/">不允许。

标签: authenticationiisweb-configvirtual-directorydefault-document

解决方案


推荐阅读