2013-02-26 36 views
0

在我的cPanel服務器上,使用內置的cPanel的mod_security 2.7時(通過EasyApache安裝),此代碼:的mod_security鏈的作品,而不規則的ID,但無法在2.7使用規則ID(的cPanel)

SecRule REQUEST_URI "!(/do_command)" chain "id:1234123478" 
SecRule REQUEST_URI "\.php\?.*=(https?|ftp)\:/.*(cmd|command)=" 

產生這個錯誤:

Syntax error on line 177 of /usr/local/apache/conf/modsec_rules/modsec2.vectro.conf: SecRule takes two or three arguments, rule target, operator and optional action list

此代碼適用於預2.7,而不規則的編號,但2.7使用時,然後給出了這個錯誤。

回答

0

也許你用有效的mod_sec規則試試吧:)

SecRule REQUEST_URI "!(/do_command)" "chain,phase:1,id:'1001',t:none,pass,nolog" 
    SecRule REQUEST_URI "\.php\?.*=(https?|ftp)\:/.*(cmd|command)=" "t:none,ctl:ruleRemoveById=960015" 
相關問題