Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want certain Apache directives, like SSLCACertificateFile, to be enabled in some Locations, but disabled in others. For example,

# Require client certificates for
<Location "/secure">
    SSLCACertificateFile /path/to/my/file
    SSLVerifyClient requried

# Allow access to without certificates
<Location "/secure/exception">
    SSLCACertificateFiles none       # doesn't work
    SSLVerifyClient none             # works

The documentation doesn't discuss any "off" values for the SSLCACertificateFile directive, though.

share|improve this question
Just a typo? SSLCACertificateFile<s> – Jeff Warnica Dec 7 '12 at 23:48
up vote 4 down vote accepted

If you have SSLVerifyClient turned off, SSLCACertificateFile is completely inactive, there's no reason to do anything further to 'disable' it.

In any case, you can't set SSLCACertificateFile separately in different <Location> blocks - per the documentation, it's only valid in the main server config or the <VirtualHost> context.

share|improve this answer
SSLVerifyClient/SSLCACertificateFile was just a specific example of a general problem. – Ian Dunn Dec 10 '12 at 18:15
@IanDunn There's no general solution; the solution is different depending on what directive you're trying to disable in what context. – Shane Madden Dec 10 '12 at 18:27

To disable options that don't have an on/off option simply comment them out. Just be aware that some options are used in "sets", so you may need to comment out more than one.

share|improve this answer
I don't think you understood the question. I want to disable the options programatically at run-time, based on the Location. See the example in the question. – Ian Dunn Dec 10 '12 at 18:14
I think you need to clarify the question. As it stands there is no hint that this needs to be done programmatically, at run time or any other time. – John Gardeniers Dec 11 '12 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.