This function deploys the staged changes for all of the ModSecurity™ configuration files into the live configuration files. After the function deploys the configuration files, it restarts Apache. If the new configuration is invalid, the system restores the original configuration and preserves the staged changes.
Important:
When you disable the Web Server role, the system disables this function.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_deploy_all_rule_changes
{- "data": {
- "failed": [
- "modsec_vendor_configs/MyVendor/one.conf"
], - "outcomes": [
- {
- "config": "modsec_vendor_configs/MyVendor/one.conf",
- "exception": "The system could not deploy changes for modsec_vendor_configs/MyVendor/one.conf: The system could not validate the new Apache configuration, because httpd exited with a nonzero value. Apache produced the following error: httpd: Syntax error on line 37 of /usr/local/apache/conf/httpd.conf: Syntax error on line 26 of /usr/local/apache/conf/modsec2.conf: Syntax error on line 27 of /usr/local/apache/conf/modsec2.cpanel.conf: Could not open configuration file /usr/local/apache/conf/modsec_vendor_configs/MyVendor/one.conf: No such file or directory\n\n\n",
- "ok": 0
}
]
}, - "metadata": {
- "command": "modsec_deploy_all_rule_changes",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}