Tag Archives: mod_security

解决Apache的Mod_Security和svn模块冲突

今天svn突然不能提交了,给777都没用,一直报错

Command: Commit
Error: Commit failed (details follow):
Error: access to ‘/!svn/vcc/default’ forbidden
Finished!:

Google了好一阵子,解决方案如下:

在svn对应的虚拟主机的</VirtualHost>之前插入这样一段

<IfModule mod_security2.c>
SecRuleRemoveByID 960032
SecRuleRemoveByID 960015
SecRuleRemoveByID 960904
SecRuleRemoveByID 960010
SecRuleRemoveByID 960035
SecRule REQUEST_METHOD “^(PROPFIND|PROPPATCH)$” allow
SecRule REQUEST_METHOD “^(REPORT|OPTIONS)$” allow
SecRule REQUEST_METHOD “^(MKACTIVITY|CHECKOUT)$” allow
SecRule REQUEST_METHOD “^(PUT|DELETE|MERGE)$” allow
SecRule REQUEST_METHOD “^(MKCOL)$” allow
</IfModule>

完成后重启apache就可以了。

原因:mod_security过于严格=。-