我配置了 mod-security,来自https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_security-with-apache-on-debian-ubuntu之后重新启动 apache 服务但我发现错误:
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.
错误日志:(但我认为这不是模式安全故障的日志)
[Sun Jan 11 01:40:20.278652 2015] [mpm_prefork:notice] [pid 5359] AH00169: caught SIGTERM, shutting down
我也使用模式规避。
答案1
错误在这里:编辑您的 httpd.conf/apache2.conf
<IfModule security2_module>
Include crs/modsecurity_crs_10_setup.conf
Include crs/activated_rules/*.conf
</IfModule>
将其更改为
<IfModule security2_module>
# Include crs/modsecurity_crs_10_setup.conf
Include crs/activated_rules/*.conf
</IfModule>
在激活 booth 线路的情况下,apache 包含 2 次相同的配置,然后您在重新启动时收到具有相同 ID 的错误。