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.

Authorizations:
query Parameters
config
required
string

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

Example: config=modsec_vendor_configs/example.conf

Responses

Response Schema: application/json
data
object
object

Request samples

whmapi1 --output=jsonpretty \
  modsec_make_config_active \
  config='modsec_vendor_configs/example.conf'

Response samples

Content type
application/json
{
  • "data": { },
  • "metadata": {
    • "command": "modsec_make_config_active",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}