ModSecurity 403 访问被拒绝
ModSecurity 403 access denied
当我尝试访问子目录时,日志中出现以下错误:
ModSecurity: Access denied with code 403 (phase 2). Matched phrase ".profile" at ARGS:scope. [file "/etc/apache2/conf.d/modsec_vendor_configs/comodo_apache/09_Global_Other.conf"] [line "57"] [id "210580"] [rev "1"]
请求在 URI 中有 .profile 字,但我在 Google 登录范围内使用它。
是否可能,用 .htaccess 禁用它?我已经尝试使用它了:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
但是没用。
我试图将它放在根 .htaccess 文件和子目录 .htaccess 文件中。
更新:
浏览器中的错误是:
Forbidden
You don't have permission to access /SUBDIR/index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
试试这个:
<IfModule mod_security2.c>
SecRuleUpdateTargetById 210580 !ARGS:'scope'
</IfModule>
当我尝试访问子目录时,日志中出现以下错误:
ModSecurity: Access denied with code 403 (phase 2). Matched phrase ".profile" at ARGS:scope. [file "/etc/apache2/conf.d/modsec_vendor_configs/comodo_apache/09_Global_Other.conf"] [line "57"] [id "210580"] [rev "1"]
请求在 URI 中有 .profile 字,但我在 Google 登录范围内使用它。
是否可能,用 .htaccess 禁用它?我已经尝试使用它了:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
但是没用。
我试图将它放在根 .htaccess 文件和子目录 .htaccess 文件中。
更新:
浏览器中的错误是:
Forbidden
You don't have permission to access /SUBDIR/index.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
试试这个:
<IfModule mod_security2.c>
SecRuleUpdateTargetById 210580 !ARGS:'scope'
</IfModule>