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?

2 Answers 2

<Directory /path/to/dir>
SecRuleEngine Off
  • 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, 2009 at 3:11
  • I don;t think regex are allowed in apache cfg files, though wildcard works; search in this direction
    – quaie
    Sep 24, 2009 at 11:49
  • <Directory> and <DirectoryMatch> support regular expressions, see httpd.apache.org/docs/2.2/mod/core.html#directorymatch
    – joschi
    Aug 16, 2010 at 6:42

See this wiki page for examples:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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