Apache server fault after configure mod-security2

apache-2.2apache-2.4mod-security

I configured mod-security, from https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_security-with-apache-on-debian-ubuntu . After that a restart apache service but i caught error:

The apache2 configtest failed. Output of config test was:
AH00526: Syntax error on line 97 of /usr/share/modsecurity-crs/modsecurity_crs_10_setup.conf:
ModSecurity: Found another rule with the same id
Action 'configtest' failed.
The Apache error log may have more information.

error log: (but I think thats not log from fault of mode-security)

[Sun Jan 11 01:40:20.278652 2015] [mpm_prefork:notice] [pid 5359] AH00169: caught SIGTERM, shutting down

I also use mode-evasive.

Best Answer

The Error is here: Edit your httpd.conf/apache2.conf

<IfModule security2_module>
Include crs/modsecurity_crs_10_setup.conf
Include crs/activated_rules/*.conf
</IfModule>

Change it to

<IfModule security2_module>
# Include crs/modsecurity_crs_10_setup.conf
Include crs/activated_rules/*.conf
</IfModule>

With booth lines activated, apache includes 2 times the same config and then you get the Error with the same id while restarting.