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 am running a host and just updated mod_security. It "broke" a CMS in multiple sites. I want to white list all sub-directories named CMS. How do I specify a rule to do that?

share|improve this question
<Directory /path/to/dir>
SecRuleEngine Off
share|improve this answer
but this is just for a single directory... what if i want a bunch of directories that are named CMS? like /path/to/CMS /another/path/CMS /yetanother/CMS – kylex Sep 24 '09 at 3:11
I don;t think regex are allowed in apache cfg files, though wildcard works; search in this direction – petre Sep 24 '09 at 11:49
<Directory> and <DirectoryMatch> support regular expressions, see – joschi Aug 16 '10 at 6:42

See this wiki page for examples:

share|improve this answer

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.