1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

what Hook/Script whatever is called in case cpanel updates the httpd.conf

Discussion in 'cPanel Developers' started by Mrg, Feb 8, 2012.

  1. Mrg

    Mrg New Member

    Joined:
    Feb 8, 2012
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    what Hook/Script whatever is called in case cpanel updates the httpd.conf?

    explain:
    We need to run a script after a user adds a domain, delete a subdomain and so on.
    So we need to run a script after every time cpanel changes httpd.conf.
    /scripts/postupdateuserdomains hook dows not work. seems not to call after domain/subdomain creation/delete

    Thanks
    Martin
     
  2. charsleysa

    charsleysa Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    Re: what Hook/Script whatever is called in case cpanel updates the httpd.co

    Try taking a look here, maybe this could help EasyApache Hook Scripts
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    Re: what Hook/Script whatever is called in case cpanel updates the httpd.co

    Typically I recommend hooking the API 1/API 2 functions that handle the creation of an addon domain, removal of an addon domain, creation of a parked domain, removal of a parked domain, creation of a subdomain, removal of a subdomain and hook account creation and account termination to cover most aspects of domains. In 11.31 and later, with Standard Hooks, you can also hook account modification (for when someone changes the domain associated with an account).
     
  4. Mrg

    Mrg New Member

    Joined:
    Feb 8, 2012
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Re: what Hook/Script whatever is called in case cpanel updates the httpd.co

    Thanks for answer.

    EasyApache Hook Scripts is not for us, because they where called only if apache wars rebuild and so on.

    How can we hook the API?
    And is there an overview what functions modify the httpd.conf (because not to forget one and our httpd.conf is changed without call the hook)

    In case of change the httpd.conf the apache must be restart. what script does this? Because may we can input our script there.

    Thanks so far.
     
  5. charsleysa

    charsleysa Member

    Joined:
    Jul 18, 2011
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palmerston North, New Zealand
    Re: what Hook/Script whatever is called in case cpanel updates the httpd.co

    Why exactly do you need to hook every time httpd.conf is modified? Because there are pre-includes for httpd.conf that can be modified permanently even when EasyApache updates and modifies httpd.conf the pre includes will be unmodified.
    cPanel 11.32 doesn't seem to be in the RELEASE tier yet so Standard Hooks wont be available until you update to 11.31/32

    Here are some links that might be useful:
    How httpd.conf Is Processed
    Include Editor
     

Share This Page