ModSecurity
Server Settings

Add ModSecurity configuration file include

This function adds an include for a ModSecurity™ configuration file to the modsec2.cpanel.conf file. This makes the ModSecurity configuration file active.

Important:

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

get/modsec_make_config_active

Request

  • Base URL
    https://whm-server.tld:2087/json-api
  • Auth
    HTTP basic

Query parameters

configstring required
Example:modsec_vendor_configs/example.conf

The ModSecurity configuration file's path and filename, relative to the /usr/local/apache/conf/ diretory.

Response

HTTP Request was successful.

dataobject

Example response

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

Changes

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