This function retrieves a ModSecurity™ configuration file's contents.
Important:
When you disable the Web Server role, the system disables this function.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ modsec_get_config_text \ config='modsec2.example.conf'
{- "data": {
- "text": "SecRule REQUEST_URI \"example\" \"deny:id:123456789\" SecAction \"pass:auditlog:id:444444444\""
}, - "metadata": {
- "command": "modsec_get_config_text",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}