ModSecurity
6 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="ModSecurity", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.disable_all_domains GET#
Disable ModSecurity for all domains
This function disables ModSecurity™ on a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
disable_domains GET#
Disable ModSecurity for selected domains
This function disables ModSecurity™ on specified domains.
Important:
When you disable the WebServer role, the system disables this function.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
Payload varies by call.
enable_all_domains GET#
Enable ModSecurity for all domains
This function enables ModSecurity™ on a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of:
enable_domains GET#
Enable ModSecurity for selected domains
This function enables ModSecurity™ for specified domains.
Important:
When you disable the WebServer role, the system disables this function.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
Payload varies by call.
has_modsecurity_installed GET#
Return ModSecurity installation status
This function checks whether ModSecurity™ is installed on a server.
Important:
When you disable the Web Server role, the system disables this function.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
list_domains GET#
Return ModSecurity domains' status
This function returns ModSecurity's™ status for a cPanel account's domains.
Important:
When you disable the WebServer role, the system disables this function.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data is an array of: