Enable staged ModSecurity configuration files

This function deploys the staged changes to your modsec2.cpanel.conf file and attempts to restart Apache. If the new settings fail validation, the system restores the /etc/apache2/conf.d/modsec/modsec2.cpanel.conf file.

Note:

Call the WHM API 1 modsec_set_setting function to prepare your changes for the modsec2.cpanel.conf file.

Important:

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

Authorizations:

Responses

Response Schema: application/json
data
object
object

Request samples

whmapi1 modsec_deploy_settings_changes

Response samples

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