我有 apache2 httpd 版本 2.2.9 在 SSLEngine 开启的情况下监听端口 443。所有 URL 都有 SSLVerifyClient 要求
,这工作正常。
我想为特定 URL (/ca.crt
) 设置一个异常(exception),以便我的客户可以下载我们颁发给他们的证书所签署的 CA 证书。我尝试以下操作:
SSLVerifyClient require
Alias /ca.crt /my/ssl/certs/ca.crt
<Location /ca.crt>
SSLVerifyClient none
</Location>
我的问题是 Apache 似乎只想增加 SSL 客户端证书要求的强度。如果我翻转这两个要求,它会按规定工作。正如上面的配置,Apache 有效地忽略了 SSLVerifyClient none
指令。
这是怎么回事?这是错误吗?
最佳答案
好的,事实证明这个问题的答案在文档中(通常是这样!)
In per-server context [the SSLVerifyClient directive] applies to the client authentication process used in the standard SSL handshake when a connection is established.
See Apache Docs - SSLVerifyClient
基本上是第一个SSLVerifyClient
指令在每个服务器上下文中。我做了一个明确的 <Directory>
声明根目录并放置SSLClientVerify require
那里的指令。这成功了。
关于ssl - 为 SSLVerifyClient 要求异常(exception),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5013631/