# Server Settings Web Server Security (ModSecurity) / Server Settings ## Add ModSecurity configuration file text - [GET /modsec_assemble_config_text](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_assemble_config_text.md): This function adds text to a ModSecurity™ configuration file. When you disable the Web Server role, the system this function. ## Run ModSecurity batch settings - [GET /modsec_batch_settings](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_batch_settings.md): This function adds, updates, and removes global ModSecurity™ configuration directives. The function modifies these directives in the file. When you disable the Web Server role, the system this function. This function supports the following ModSecurity™ configuration directives: setting_idDocumentation 0SecAuditEngine 1SecConnEngine 2SecRuleEngine 3SecDisableBackendCompression 4SecGeoLookupDb 5SecGsbLookupDb 6SecGuardianLog 7SecHttpBlKey 8SecPcreMatchLimit 9SecPcreMatchLimitRecursion ## Enable staged ModSecurity configuration files - [GET /modsec_deploy_settings_changes](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_deploy_settings_changes.md): This function deploys the staged changes to your file and attempts to restart Apache. If the new settings fail validation, the system restores the file. Call the WHM API 1 function to prepare your changes for the file. When you disable the Web Server role, the system this function. ## Return ModSecurity configuration file - [GET /modsec_get_config_text](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_get_config_text.md): This function retrieves a ModSecurity™ configuration file's contents. When you disable the Web Server role, the system this function. ## Return all ModSecurity configuration files - [GET /modsec_get_configs](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_get_configs.md): This function lists ModSecurity™ configuration files. The system stores the configuration files in the  directory. When you disable the Web Server role, the system this function. ## Return staged ModSecurity configuration files - [GET /modsec_get_configs_with_changes_pending](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_get_configs_with_changes_pending.md): This function lists the ModSecurity™ configuration files that have staged changes. When you disable the Web Server role, the system this function. ## Return ModSecurity logs - [GET /modsec_get_log](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_get_log.md): This function retrieves ModSecurity™ log entries from the modsec MySQL® database. When you disable the Web Server role, the system disables this function. ## Return ModSecurity configuration - [GET /modsec_get_settings](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_get_settings.md): This function retrieves the server's ModSecurity™ configuration settings. The system stores these settings in the file. When you disable the Web Server role, the system this function. ## Return ModSecurity module status - [GET /modsec_is_installed](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_is_installed.md): This function checks whether the ModSecurity™ module is installed. When you disable the Web Server role, the system this function. ## Add ModSecurity configuration file include - [GET /modsec_make_config_active](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_make_config_active.md): This function adds an include for a ModSecurity™ configuration file to the file. This makes the ModSecurity configuration file active. When you disable the Web Server role, the system this function. ## Remove ModSecurity configuration file include - [GET /modsec_make_config_inactive](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_make_config_inactive.md): This function removes an include for a ModSecurity™ configuration file from the file. This makes the ModSecurity configuration file inactive. When you disable the Web Server role, the system this function. ## Remove ModSecurity configuration - [GET /modsec_remove_setting](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_remove_setting.md): This function removes a global ModSecurity™ configuration directive. When you disable the Web Server role, the system disables this function. ## Update ModSecurity configuration file - [GET /modsec_set_config_text](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_set_config_text.md): This function sets the contents of a specified ModSecurity™ configuration file. The system stages any changes to the configuration file. To deploy the changes, call WHM API 1's function. When you disable the Web Server role, the system disables this function. ## Update ModSecurity configuration - [GET /modsec_set_setting](https://api.docs.cpanel.net/specifications/whm.openapi/server-settings/modsec_set_setting.md): This function sets a global ModSecurity™ configuration directive. When you disable the Web Server role, the system this function.