Here are instructions on how to disable Mod-Security for a specific domain using different methods:
-
cPanel Method:
- Log into your cPanel.
- Under the Security section, select ModSecurity.
- Choose the domain you want to work with and switch ModSecurity from On to Off.
- Wait for the pop-up confirmation that ModSecurity has been disabled.
- Troubleshoot any issues you might be experiencing.
- After resolving the issue, remember to reactivate ModSecurity in cPanel12.
-
Manual Configuration (via Apache):
- Edit the modsec2.conf file (usually located at
/etc/httpd/conf/modsec2.conf). - Include the following line to load custom rules:
Include "/usr/local/apache/conf/modsec2.custom.local.conf" - Add a rule to disable Mod-Security for the specific domain:
SecRule SERVER_NAME "domain.com" phase:1,nolog,allow,ctl:ruleEngine=off - Run a configuration test:
/etc/init.d/httpd configtest - Restart Apache:
/etc/init.d/httpd restart
- Edit the modsec2.conf file (usually located at
-
WHM (Web Host Manager) Method:
- Log in to WHM.
- Navigate to Plugins and select ConfigServer Mod_Security Control.
- Disable the rules blocking access to the domain by adding it to the user whitelist.
Remember to exercise caution when disabling security features, and always re-enable them once you’ve resolved any issues or completed necessary tasks. Safety first!
Learn more here: https://support.cpanel.net/hc/en-us/articles/1500007340982-How-to-disable-mod-security-for-a-particular-domain-using-cPanel