authentication - 如何做类似的事情在 applicationHost.config 中将 sslFlags 应用于“/”但虚拟目录中没有任何内容?
问题描述
在托管https://example.com的 IIS 10.0 服务器上,我应该在我的 applicationHost.config 中添加什么,以使以下所有内容都成立:
- https://example.com/不请求客户端证书。
- https://example.com/index.html不请求客户端证书。
- 其他一切,https://example.com/ * ,请求并需要客户端证书。
- https://example.com/index.html是 https://example.com/ 的默认文档
<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="/">
不允许。
解决方案
推荐阅读
- sql - 如何通过 substr-instr 从特定位置获取特定值
- postgresql - Postgres fulltextsearch 在一列中有多个单词
- python - 迁移学习时 TensorFlow 中的验证和评估指标问题
- python - 解析 XML 并存储值(如果它们出现在列表中)
- android - 为什么Play商店显示“没有可用的性能数据”?
- reactjs - 如何从承诺中获得回报
- java - RecyclerView 和 SQLite 自定义 OnClickListener
- c# - System.Text.Json 自定义 JsonConverter
.Deserialize() 未使用 .Read() 方法 - java - void @Async 方法的单元测试用例
- android - 根据选定的微调器项启用/禁用编辑文本