# Rule Settings Web Server Security (ModSecurity) / Rule Settings ## Add staged ModSecurity rule - [GET /modsec_add_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_add_rule.md): This function adds a new rule to a ModSecurity™ configuration staging file. For example, if you choose to add a rule for the example.conf file, the function stages the rule in the example.conf. STAGE file. This function does not actually deploy the rule. To deploy the rule, use the WHM API 1 Functions - modsec_deploy_all_rule_changes function. When you disable the Web Server role, the system disables this function. ## Validate ModSecurity rule - [GET /modsec_check_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_check_rule.md): This function checks a ModSecurity™ rule's validity. When you disable the Web Server role, the system this function. ## Save ModSecurity rule copy - [GET /modsec_clone_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_clone_rule.md): This function copies a ModSecurity™ rule with a new rule ID. When you disable the Web Server role, the system this function. ## Enable all staged ModSecurity rule changes - [GET /modsec_deploy_all_rule_changes](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_deploy_all_rule_changes.md): 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. When you disable the Web Server role, the system this function. ## Enable staged ModSecurity rule changes - [GET /modsec_deploy_rule_changes](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_deploy_rule_changes.md): This function deploys staged changes to the ModSecurity™ configuration file and restarts Apache. If the new configuration is invalid, the system will restore the original configuration and maintain the staged changes. When you disable the Web Server role, the system this function. ## Disable ModSecurity rule - [GET /modsec_disable_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_disable_rule.md): This function disables a ModSecurity™ rule. When you disable the Web Server role, the system this function. ## Remove all staged ModSecurity rule changes - [GET /modsec_discard_all_rule_changes](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_discard_all_rule_changes.md): This function discards the staged ModSecurity™ rule changes, if present, for all of the configuration files. When you disable the Web Server role, the system this function. ## Remove staged ModSecurity rule changes - [GET /modsec_discard_rule_changes](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_discard_rule_changes.md): This function discards staged rule changes for a ModSecurity™ configuration file. Staged rule changes reside in a  file (for example, the staged changes for the file exist in the file). This function deletes the  file that corresponds to the configuration file that you specify. To stage rule changes, call WHM API 1's function. When you disable the Web Server role, the system this function. ## Update staged ModSecurity rule - [GET /modsec_edit_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_edit_rule.md): This function stages edits to a ModSecurity™ rule. The system does save changes directly to the configuration file. Instead, it stages the changes to the configuration file's  file (for example, for the file, the system stages changes in the file). When you disable the Web Server role, the system this function. ## Return ModSecurity rules - [GET /modsec_get_rules](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_get_rules.md): This function retrieves the ModSecurity™ rules from one or more ModSecurity configuration files. * When you disable the Web Server role, the system disables this function. * You include either the the parameters. ## Remove ModSecurity rule - [GET /modsec_remove_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_remove_rule.md): This function removes a rule from a ModSecurity™ configuration file. When you disable the Web Server role, the system disables this function. ## Export ModSecurity rule error report - [GET /modsec_report_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_report_rule.md): This function submits ModSecurity™ rule error reports to a remote receiver. The third party rule vendors use these error reports to identify problems with their rule sets. When you disable the Web Server role, the system this function. ## Enable ModSecurity rule - [GET /modsec_undisable_rule](https://api.docs.cpanel.net/specifications/whm.openapi/rule-settings/modsec_undisable_rule.md): This function enables a ModSecurity™ rule. When you disable the Web Server role, the system disables this function.