Acabei de atualizar meu servidor de 14.04 para 16.04 LTS, tudo estava ok, exceto que o apache2 começou a falhar devido a um erro de sintaxe de modsecurity
.
Se eu desabilitar essa regra de:
Oct 09 14:46:04 apache2[8487]: AH00526: Syntax error on line 118 of /usr/share/modsecurity-crs/activated_rules...
Ele continuará a falhar em outras regras diferentes, não sei por que isso está acontecendo, antes de funcionar bem.
Aqui está um registro completo:
Oct 09 14:46:03 apache2[8487]: * Starting Apache httpd web server apache2
Oct 09 14:46:04 apache2[8487]: *
Oct 09 14:46:04 apache2[8487]: * The apache2 configtest failed.
Oct 09 14:46:04 apache2[8487]: Output of config test was:
Oct 09 14:46:04 apache2[8487]: AH00526: Syntax error on line 118 of /usr/share/modsecurity-crs/activated_rules/modsecurity_crs_20_protocol_violations.conf:
Oct 09 14:46:04 apache2[8487]: ModSecurity: Execution phases can only be specified by chain starter rules.
Oct 09 14:46:04 apache2[8487]: Action 'configtest' failed.
Oct 09 14:46:04 apache2[8487]: The Apache error log may have more information.
Oct 09 14:46:04 systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 09 14:46:04 systemd[1]: Failed to start LSB: Apache2 web server.
Aqui também estão 118 linhas desses arquivos:
SecRule FILES_NAMES|FILES "['\";=]" \
"msg:'Attempted multipart/form-data bypass', \
severity:'2', \
id:'960000', \
ver:'OWASP_CRS/2.2.9', \
rev:'1', \
maturity:'9', \
accuracy:'7', \
logdata:'%{matched_var}', \
phase:2, \
block, \
t:none,t:urlDecodeUni, \
114 tag:'OWASP_CRS/PROTOCOL_VIOLATION/INVALID_REQ', \
115 tag:'CAPEC-272', \
116 setvar:'tx.msg=%{rule.msg}', \
117 setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \
118 setvar:'tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_REQ-%{matched_var_name}=%{matched_var}'"
EDITAR:
Se eu desabilitar a regra de onde o erro está chegando, ele continuará a falhar em outras regras, AH00526: Syntax error on line 192 of ...
e toda vez que aparecer:
ModSecurity: Execution phases can only be specified by chain starter rules.
E toda vez que está falhando quando se trata desta linha:
setvar:'tx.%{rule.id}-OWASP_CRS/PROTOCOL_VIOLATION/INVALID_HREQ-%{matched_var_name}=%{matched_var}'"
Alguma ideia de como posso resolver este problema?