Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    8

    Default 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

  2. #2
    Member
    Join Date
    Jun 2006
    Posts
    212

    Default

    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

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    8

    Default

    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....

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Default

    Hey, did you ever figure this issue out? We have similar needs for this.

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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

  6. #6
    Registered User
    Join Date
    Aug 2008
    Posts
    2

    Default

    Do you know if we could easily enable this option through ModernBill v4?

Similar Threads & Tags
Similar threads

  1. Automatic DB creation script
    By rbro in forum cPanel Developers
    Replies: 1
    Last Post: 05-26-2008, 11:23 AM
  2. how to :automatic account creation ?
    By sanzeeb in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-13-2007, 04:18 AM
  3. Automatic account creation? is there a way?
    By wonderboy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-11-2003, 07:41 PM
  4. automatic account-creation
    By strauberry in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-28-2003, 05:45 PM
  5. Automatic Account Creation
    By bdraco in forum cPanel and WHM Discussions
    Replies: 28
    Last Post: 05-13-2002, 02:54 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube