when submitting new content via:
mydomain.com/newarticle.php
mydomain.com/newthread.php
it triggers multiple "deny" mod security rules, i do not want to tweak these rules anyhow, instead i want to whitelist mentioned files from blocking by mod security
i tried to
1. create new rule on the top of all rules in /usr/local/apache/conf/modsec2.user.conf
Does not work, other rules still trigger 403.
Note that i also use include files to include more rules from external .conf files. There is also this line: Include /usr/local/apache/conf/modsec2.whitelist.conf here is the content ->
edit httpd.conf file to disable mod. sec. engine on certain path
i tried this, but i am still blocked on tha tpath by mod. sec.:
<IfModulemod_security.c><If"%{REQUEST_URI}=~m#/newarticle/#">
SecFilterEngine Off
SecFilterScanPOST Off
</If></IfModule><IfModulemod_security.c><Filenewarticle.php>
SecRequestBodyAccess Off
</File></IfModule><IfModulemod_security.c><FilesMatch"^(editpost|newreply|newthread)\.php$">
SecFilterEngine Off
SecFilterScanPOST Off
</FilesMatch></IfModule>
Hello,
when submitting new content via:
mydomain.com/newarticle.php
mydomain.com/newthread.php
it triggers multiple "deny" mod security rules, i do not want to tweak these rules anyhow, instead i want to whitelist mentioned files from blocking by mod security
i tried to
1. create new rule on the top of all rules in /usr/local/apache/conf/modsec2.user.conf
Does not work, other rules still trigger 403.
Note that i also use include files to include more rules from external .conf files. There is also this line: Include /usr/local/apache/conf/modsec2.whitelist.conf here is the content ->
i tried this, but i am still blocked on tha tpath by mod. sec.:
Please what is the correct rule to whitelist it?
Apache/2.2.34
security2_module
ModSecurity: APR compiled version="1.5.1"; loaded version="1.5.1"
ModSecurity: PCRE compiled version="8.38 "; loaded version="8.38 2015-11-23"
ModSecurity: LUA compiled version="Lua 5.1"
ModSecurity: LIBXML compiled version="2.9.2
Last edit: Daniel Kolar 2017-10-11
Here is related issue and what worked is to edit mod security .conf file that is containing custom mod. sec. rules and add special rule.
Though it would be better to whitelist full path including domain, not just file name. But for that i am unsure how to do now.
Hey @Daniel Kolar,
This form isn't supported anymore. If you have any further questions please reach out on the ModSecurity Github page. Thanks!