|
|||
|
Automatic Subdomain Creation...
Hi, i am looking to automatically create subdomains for each new account that we setup.
Example: after a new account is created we would like a subdomain ex: program.domain.com to be automatically created, that links to a specific software on the server ex: /opt/program . Any help on this issue is appreciated. Thank you in advance |
|
|||
|
You can take advantage of the cPanel hooks:
http://www.cpanel.net/support/docs/hooks.htm This one in particular should help you accomplish the intended behavior: /scripts/postwwwacct This script will be run after an account is created. Within this script, data from /scripts/wwwacct can be accessed so that it can be passed to something such as a billing solution, custom application, or script.
__________________
Alex Villegas Quality Assurance cPanel.net |
|
|||
|
Ok i know where to input the code, just i need the actual functions.
First I want to run a command as in SSH: ln -s /opt/program /home/USERNAME/public_html/program And then I need the actual code that would create the subdomain. Any help is appreciated.... |
|
||||
|
Quote:
You can find this API call in /usr/local/cpanel/base/frontend/x3/subdomain/doadddomain.html and the documentation for how to call it from the XML API at: http://www.cpanel.net/plugins/xmlapi
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
![]() |
| Thread Tools | |
| Display Modes | |
|
|