ModSecurity

Disable ModSecurity for selected domains

This function disables ModSecurity™ on specified domains.

Important:

When you disable the WebServer role, the system disables this function.

get/ModSecurity/disable_domains

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Query parameters

domainsstring required
Example:example.com,dallas.example.com,galveston.example.com

A comma-separated list of domains that the cPanel account owns.

Important:

The authenticated cPanel account must own these domains.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "disable_domains",
  "module": "ModSecurity",
  "result": {
    "data": [
      {
        "dependencies": [
          "dallas.com"
        ],
        "domain": "dallas.example.com",
        "enabled": 0,
        "searchhint": "dallas.com",
        "type": "sub"
      },
      {
        "dependencies": [
          "arkansas.com",
          "kansas.com",
          "nevada.com",
          "newmexico.com",
          "texas.com"
        ],
        "domain": "example.com",
        "enabled": 0,
        "searchhint": "arkansas.com,kansas.com,nevada.com,newmexico.com,texas.com",
        "type": "main"
      },
      {
        "dependencies": [
          "galveston.com"
        ],
        "domain": "galveston.example.com",
        "enabled": 0,
        "searchhint": "galveston.com",
        "type": "sub"
      }
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes

No recorded changes to this operation across all 5 revisions of this API.