Applying a narrowly scoped ModSecurity exception as administrator

A false-positive exception should remove only the protection that blocks a verified legitimate request. Disabling a rule globally is broader than excluding a particular path, parameter or domain and requires a different risk decision.

What you need before you begin

Confirm the exact rule ID, request and affected application from logs. Save current custom rules and determine the active ModSecurity engine, ruleset and supported exclusion mechanism. This is an administrator task, not a reason to give a customer unrestricted WHM access.

01 Apply a narrowly scoped ModSecurity exception as administrator

  1. First check whether an application fix or vendor ruleset update resolves the false positive. Keep the reproducible test for comparison.
  2. Design the smallest supported exclusion using the ruleset’s documentation, scoped to the necessary host, path or parameter. Record why the excluded input is legitimate.
  3. Add the reviewed custom rule or supported per-domain include through the approved cPanel configuration mechanism. Do not edit managed vendor rule files that updates replace.
  4. Validate configuration syntax and deploy through the supported workflow. WHM’s ModSecurity Tools can stage changes before its deploy-and-restart action.
  5. Repeat the legitimate request and test that unrelated protected requests still receive the intended handling. Monitor logs and remove a temporary exception after the underlying fix.

Confirm the expected result

The approved operation should work while the remaining ruleset stays enabled. Record the exception’s scope, author, date and review trigger so it does not become an unexplained permanent bypass.

Troubleshoot unexpected results

If deployment fails, restore the saved custom configuration and validate before restarting again. If only a global disable control is available, ask the qualified server administrator for a narrower supported implementation rather than assuming the scope is per-domain.

Can I reuse an exception from another website?

Only after reviewing its exact match conditions and rule meaning. A copied broad exclusion can remove protection from inputs your application handles differently.

  • 0 Users Found This Useful
  • cpanel-whm, servers
Was this answer helpful?

Related Articles

Setting the default nameservers in WHM

The WHM default nameservers provide nameserver values for account provisioning on the server....

Changing the server root password in WHM

The root password controls a highly privileged server account. Change it only when you...

Using WHM disabled features for server-wide restrictions

The special disabled feature list is a server-wide restriction mechanism. It overrides ordinary...

Setting the server time and timezone in WHM

Accurate server time matters for logs, scheduled jobs, authentication and licensing. A timezone...

Setting up private nameservers for a WHM reseller

Private nameservers such as ns1.example.com and ns2.example.com let customers use nameservers...