[root @ vmn-ssd-42~] #httpd -t
/etc/httpd/conf.d/mod_security.conf第17行的语法错误:
ModSecurity:规则中没有操作ID
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'"
答案 0 :(得分:2)
自ModSecurity 2.7 the id attribute is mandatory以来。您的第二条规则不包含ID。
从中改变:
SecRule REQUEST_HEADERS:Content-Type "multipart/form-data" \
"chain,phase:2,t:none,t:lowercase,deny,msg:'ModSecurity DoS attempt - NULL part header name'"
对此(假设规则ID 200001未在其他地方使用):
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'"