Far*_*han 5 mod-security apache-2.2
有没有办法禁用所有网站的 mod-security?除了一个?我托管了 500 多个网站,只想为一个网站启用它,该网站受到攻击。
tha*_*osk 10
好吧,我想如果您使用以下内容在 .htaccess 或该特定域的虚拟主机 apache 配置中启用 mod 安全性配置是可能的:
<IfModule mod_security2.c>
SecRuleEngine On
...... (any other directives you might want to override from the defaul conf)
</IfModule>
Run Code Online (Sandbox Code Playgroud)
同样在/etc/httpd/conf.d/mod_security.conf
,或存储默认配置的任何地方,设置SecRuleEngine Off
但保留其他指令。