Child pages
  • WHM API 1 Functions - modsec_deploy_settings_changes

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

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.

Note
titleNote:

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


Warning
titleImportant:
  • 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.

Multiexcerpt include
SpaceWithExcerptcom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@12665
MultiExcerptNameAPIDisabledWebServerRole
PageWithExcerptLIB:_ServerRoleDisabledAPI

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


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



Expand
titleXML API


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



Expand
titleCommand Line


Code Block
languagebash
whmapi1 modsec_deploy_settings_changes

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
 {
    "data": {},
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": 1,
        "command": "modsec_deploy_settings_changes"
    }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
 <result>
  <data/>
  <metadata>
    <version>1</version>
    <reason>OK</reason>
    <result>1</result>
    <command>modsec_deploy_settings_changes</command>
  </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


Parameters

This function does not accept parameters.

Returns

This function only returns metadata.