Enable staged ModSecurity rule changes

This function deploys staged changes to the ModSecurity™ configuration file and restarts Apache.

Note:

If the new configuration is invalid, the system will restore the original configuration and maintain the staged changes.

Important:

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

SecurityBasicAuth
Request
query Parameters
config
required
string

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

Example: config=modsec_vendor_configs/example.conf
Responses
200

HTTP Request was successful.

Response Schema: application/json
data
object
object
get/modsec_deploy_rule_changes
Request samples
whmapi1 --output=jsonpretty \
  modsec_deploy_rule_changes \
  config='modsec_vendor_configs/example.conf'
Response samples
application/json
{
  • "data": { },
  • "metadata": {
    • "command": "modsec_deploy_rule_changes",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}