This function sets a global ModSecurity™ configuration directive.
Important:
When you disable the Web Server role, the system disables this function.
setting_id required | integer >= 0 The setting's ID. Note: The WHM API 1 Example: setting_id=8 |
state required | string The setting's new state. The function uses this as a valid argument for the directive. Note: For more information, read SpiderLabs' ModSecurity documentation. Example: state=2000 |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_set_setting \ setting_id='8' \ state='2000'
{- "data": {
- "default": "1500",
- "description": "This setting allows you to define the match limit of the PCRE library.",
- "directive": "SecPcreMatchLimit",
- "name": "PCRE library match limit",
- "radio_options": [
- {
- "name": "Log all transactions.",
- "option": "On"
}
], - "setting_id": 8,
- "state": 2000,
- "type": "text",
- "validation": [
- {
- "arg": "[Ee]xample",
- "name": "startsWith"
}
]
}, - "metadata": {
- "command": "modsec_set_setting",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}