The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wildcard Subdomains via API

Discussion in 'cPanel Developers' started by GeekPatrolMille, Oct 13, 2009.

  1. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    The situation is a sales organization who wishes to have a server alias of *.domain.com so they can process any specialized site like agentname.domain.com on the fly.

    Can I write PHP script that allows for a cPanel user account to create and delete subdomains by using an API call?

    All that I have read so far indicate they would not be restricted to their own domain, is this correct?

    If I am mistaken and this is possible, can anyone give an example of how to do this please. Much gratitude in advance for your assistance...

    Thanks,-greg
     
  2. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    Found a simpler way to do this based on the documentation found here.

    cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf

    I created the folder structure as follows:
    /usr/local/apache/conf/userdata/std/2/domain/domainname.net/

    in this folder I placed a file called "wildcard_subdomains.conf"

    In the httpd.conf file I uncommented the last line of the VirtualHost directive to Include *.conf from the folder above.

    restarted apache and it all worked fine.
     
Loading...

Share This Page