我希望某些Apache指令(如SSLCACertificateFile)在某些位置启用,但在其他位置禁用。 例如,
# Require client certificates for http://example.com/secure <Location "/secure"> SSLCACertificateFile /path/to/my/file SSLVerifyClient requried </Location> # Allow access to http://example.com/secure/exception without certificates <Location "/secure/exception"> SSLCACertificateFiles none # doesn't work SSLVerifyClient none # works </Location>
尽pipe如此,文档没有讨论SSLCACertificateFile指令的任何“off”值。
如果您closures了SSLVerifyClient ,则SSLCACertificateFile将完全处于非活动状态,因此没有理由进一步“禁用”它。
无论如何,您不能在不同的<Location>块中单独设置SSLCACertificateFile – 根据文档 ,它只在主服务器configuration或<VirtualHost>上下文中有效。
要禁用没有开/关选项的选项,只需将其注释掉即可。 请注意,“套”中使用了一些选项,因此您可能需要注释掉多个选项。