Reputation: 31
[root@vmn-ssd-42 ~]# httpd -t
Syntax error on line 17 of /etc/httpd/conf.d/mod_security.conf:
ModSecurity: No action id present within the rule
SecRuleEngine On
SecRequestBodyAccess On
SecRule REQUEST_HEADERS:Content-Type "text/xml" \
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
SecRule REQUEST_HEADERS:Content-Type "multipart/form-data" \
"chain,phase:2,t:none,t:lowercase,deny,msg:'ModSecurity DoS attempt - NULL part header name'"
Upvotes: 3
Views: 4409
Reputation: 46050
Since ModSecurity 2.7 the id attribute is mandatory. Your second rule does not contain an id.
Change it from this:
SecRule REQUEST_HEADERS:Content-Type "multipart/form-data" \
"chain,phase:2,t:none,t:lowercase,deny,msg:'ModSecurity DoS attempt - NULL part header name'"
To this (assuming rule id 200001 is not used elsewhere):
SecRule REQUEST_HEADERS:Content-Type "multipart/form-data" \
"id:'200001', chain,phase:2,t:none,t:lowercase,deny,msg:'ModSecurity DoS attempt - NULL part header name'"
Upvotes: 4