Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Hi I have mod_security enabled on a centos5 server and one of the rules is keeping a user from posting some text on a form. The text is legitimate but it has the words 'create' and an html <table> tag later in it so it is causing a false positive.

The error I am receiving is below:

[Sun Apr 25 20:36:53 2010] [error] [client] ModSecurity: Access denied with code 500 (phase 2). Pattern match "((alter|create|drop)[[:space:]]+(column|database|procedure|table)|delete[[:space:]]+from|update.+set.+=)" at ARGS:body. [file "/usr/local/apache/conf/modsec2.user.conf"] [line "352"] [id "300015"] [rev "1"] [msg "Generic SQL injection protection"] [severity "CRITICAL"] [hostname ""] [uri "/node/181/edit"] [unique_id "@TaVDEWnlusAABQv9@oAAAAD"]

and here is /usr/local/apache/conf/modsec2.user.conf (line 352)

#Generic SQL sigs SecRule ARGS "((alter|create|drop)[[:space:]]+(column|database|procedure|table)|delete[[:space:]]+from|update.+set.+=)" "id:1,rev:1,severity:2,msg:'Generic SQL injection protection'"

The questions I have are:

  1. What should I do to "whitelist" or allow this rule to get through?
  2. What file do I create and where?
  3. How should I alter this rule?
  4. Can I set it to only be allowed for the one domain, since it is the only one having the issue on this dedicated server or is there a better way to exclude table tags perhaps?

Thanks guys

share|improve this question

migrated from Apr 26 '10 at 4:46

This question came from our site for professional and enthusiast programmers.

nobody has any ideas on this? – nicholas.alipaz Apr 28 '10 at 18:07
up vote 2 down vote accepted

You can disable the ModSecurity on a specific URL with LocationMatch directive, something like this:

<LocationMatch "/node/181/edit">
  <IfModule mod_security2.c>
    SecRuleEngine Off 

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.