Description

This function deploys the staged changes to your modsec2.cpanel.conf file and attempts to restart Apache.

 If the new settings fail validation, the system restores the modsec2.cpanel.conf file.

Call the WHM API 1 modsec_set_setting function to prepare your changes for the modsec2.cpanel.conf file.


  • On systems that run EasyApache 3, the changes save to the /usr/local/apache/conf/modsec2.cpanel.conf file.  
  • On systems that run EasyApache 4 and cPanel & WHM version 56 or earlier, the changes save to the /etc/apache2/conf.d/modsec2.cpanel.conf file.
  • On systems that run EasyApache 4 and cPanel & WHM version 58 or later, the changes save to the /etc/apache2/conf.d/modsec/modsec2.cpanel.conf file.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/modsec_deploy_settings_changes?api.version=1




https://hostname.example.com:2087/cpsess##########/xml-api/modsec_deploy_settings_changes?api.version=1




whmapi1 modsec_deploy_settings_changes



 {
    "data": {},
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "modsec_deploy_settings_changes"
    }
}




 <result>
  <data/>
  <metadata>
    <version>1</version>
    <reason>OK</reason>
    <result>1</result>
    <command>modsec_deploy_settings_changes</command>
  </metadata>
</result>



Parameters

This function does not accept parameters.

Returns

This function only returns metadata.