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.

SecurityBasicAuth
Responses
200

HTTP Request was successful.

Response Schema: application/json
data
object
object
get/modsec_deploy_settings_changes
Request samples
whmapi1 --output=jsonpretty \
  modsec_deploy_settings_changes
Response samples
application/json
{
  • "data": { },
  • "metadata": {
    • "command": "modsec_deploy_settings_changes",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}