#1 (permalink)  
Old 10-26-2007, 01:48 PM
Registered User
 
Join Date: Jan 2007
Posts: 3
dilitalo is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-26-2007, 03:37 PM
Staff
 
Join Date: Jun 2006
Posts: 212
cPanelAlex is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-26-2007, 06:31 PM
Registered User
 
Join Date: Jan 2007
Posts: 3
dilitalo is on a distinguished road
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....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-12-2008, 09:12 PM
Registered User
 
Join Date: Aug 2008
Posts: 2
parachat is on a distinguished road
Hey, did you ever figure this issue out? We have similar needs for this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-13-2008, 03:00 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by parachat View Post
Hey, did you ever figure this issue out? We have similar needs for this.
You can use API1 code via the XML-API to create the subdomain automatically.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-13-2008, 03:27 PM
Registered User
 
Join Date: Aug 2008
Posts: 2
parachat is on a distinguished road
Do you know if we could easily enable this option through ModernBill v4?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc