ファイルが特定のディレクトリにある場合にのみ、ModSecurity を使用して応答コンテンツを変更したいと考えています。次のようなルールを実装しました。
SecRule REQUEST_URI "@contains /admin/" "phase:2,chain,t:none,t:urlDecode,t:lowercase,t:normalizePath,deny,log"
SecRule STREAM_OUTPUT_BODY "@rsub s/test/replaced_string/" "phase:4,t:none,log,pass,msg:'String replaced'"
しかし、このルールを書いた後、apache2 を再起動すると、modsecurity はエラーを出します: ModSecurity: Disruptive actions can only be specified by chain starter rules
. ルールを逆に書いてみましたが、役に立ちませんでした。
なぜそれが起こるのですか?