This function stages edits to a ModSecurity™ rule. The system does not save changes
directly to the configuration file. Instead, it stages the changes to the configuration
file's .STAGE
file (for example, for the example.conf
file, the system stages changes
in the example.conf.STAGE
file).
Important:
When you disable the Web Server role, the system disables this function.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_edit_rule \ config='modsec_vendor_configs/example.conf' \ id='1234567' \ rule='SecAction "pass,id:1234567"'
{- "data": {
- "rule": {
- "disabled": 0,
- "id": 1234567,
- "meta_msg": "",
- "rule": "SecAction \"pass,id:1234567\""
}
}, - "metadata": {
- "command": "modsec_edit_rule",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}