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

Mrg

Member
Feb 8, 2012
16
0
51
cPanel Access Level
Root Administrator
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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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).
 

Mrg

Member
Feb 8, 2012
16
0
51
cPanel Access Level
Root Administrator
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.
 

charsleysa

Active Member
Jul 18, 2011
41
0
56
Palmerston North, New Zealand
cPanel Access Level
Root Administrator
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