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 have mod security2 in ubuntu 14.04 LTS server. I saw the below tutorial:

The above sadly do not work on me apache error :

 * Restarting web server apache2                                                                                                                                            [fail] 
 * The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 226 of /etc/modsecurity/modsecurity.conf:
ModSecurity: No action id present within the rule
Action 'configtest' failed.

The Apache error log may have more information.

Can you recommend something similar?

share|improve this question

closed as off-topic by masegaloeh, Andrew Schulman, Jenny D, MadHatter, Katherine Villyard Mar 24 '15 at 22:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Ubuntu has ModSecurity 2.7+ which requires [1]

  • Added Rules must have ID action and must be numeric.

So best would be to add ID's to those rules and that will do the trick. For instance rule

SecRule ip:block "@eq 1" "phase:1,deny,log,logdata:'req/sec: %{ip.requests}, blocks: %{ip.blocks}',status:403"

should be

SecRule ip:block "@eq 1" "id:12345,phase:1,deny,log,logdata:'req/sec: %{ip.requests}, blocks: %{ip.blocks}',status:403"

Or some other ID which is not already used by some other rule.


share|improve this answer

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