未应用nginx和modsecurity自定义规则

时间:2013-10-30 11:58:46

标签: nginx owasp mod-security

我已经使用modsecurity最新稳定的2.7.5编译了nginx最新的稳定1.4.3但是虽然它工作但我无法识别我的自定义规则。我使用的是owasp crs 2.2.8(仅使用基本规则和协作检测阻止)。我在推荐的规则之后和20-30规则之前将modsecurity_crs_15_custom_rules.conf附加到modsecurity.conf。像这样的规则与apache 2.2.22

完美配合
SecRule  REQUEST_HEADERS " @contains /REST" "id:111115,phase:1,t:none,nolog,pass,setvar:'tx.allowed_headers=Content-Range/ ask/ additional/ X-Requested-With/ Make/ Content-Type/'" 

或者这个

SecRule REQUEST_FILENAME " <at> contains /REST" "id:111114,phase:1,t:none,nolog,pass,setvar:'tx.allowed_methods=GET HEAD POST OPTIONS PUT DELETE',setvar:'tx.allowed_request_content_type=application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|text/html|application/javascript|application/json'"

我知道不久以来,因为对nginx添加了对modsecurity的支持,但是这个应该可行。我真的很喜欢nginx,他的速度,模块和基于事件的方法,我不会回去。任何提示如何管理?

0 个答案:

没有答案
相关问题