latestOpenAPI 3.0.2cPanel License2026-08-106251554.3 MB

3da41671c02c

ModSecurity
Rule Settings

Disable ModSecurity rule

This function disables a ModSecurity™ rule.

Important:

When you disable the Web Server role, the system disables this function.

get/modsec_disable_rule

Query parameters

configstring required
Example:modsec_vendor_configs/example.conf

The ModSecurity configuration file, relative to the /etc/apache2/conf.d directory.

idstring required
Example:1234567890

The ModSecurity rule's ID.

Response

HTTP Request was successful.

Example response

{
  "metadata": {
    "command": "modsec_disable_rule",
    "reason": "OK",
    "result": 1,
    "version": 1
  }
}