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.

subdomain creation, without subdirectory of public_html?

Discussion in 'General Discussion' started by tsilihin, Aug 30, 2005.

  1. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi there

    I am looking at running a website that will be using multiple subdomains, generated on a per-user basis. My current web host doesn't allow wildcard dns, so I'm looking to implement user-based subdomains another way.

    I found this thread which gives an outline of how to create a subdomain transparently through the cpanel admin interface, which is a great help - but what I need to do is set up the subdomains so that they don't use a subdirectory of /public_html as their root - they need to use /public_html as their root. Is it possible to set a subdomain's root through whm's api, or some other way?

    Thanks in advance for any assistance.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You would have to edit httpd.conf and change the DocumentRoot for the subdomain.
     
  3. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Chirpy ... I knew this, but I don't have access to httpd.conf because I'm not the administrator of the server ...

    My question is if there is a way to do it via the cPanel / WHM api?
     
  4. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    nope you would need root access to modify httpd.conf Ask your host a good host will do this for you
     
  5. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    thanks dalem - tried that too (initially) - my host isn't willing to allow wildcard dns, which is why I was trying to fudge it manually.

    does anyone have any recommendations for (or is anyone here) a cpanel host who will support wildcard dns?

    thanks :)
     
  6. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    not a big deal I would support for my customers if the asked see my footer
     
  7. bpmod

    bpmod Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    How many sub-domains are you adding? And are you adding them all at once, or over a span of time?

    You might try adding the sub-domains first, that is, set up a new domain called sub1.domain.com, then a parked (not sub or addon) domain called sub2.domain.com... etc., until all subs are added. Then finally add the main domain as a parked domain.

    I haven't tried this so I don't know if it will work, but it may.

    Thanks

    Brian
     
  8. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the suggestion bpmod.

    Unfortunately I'd be doing it in a reverse way ... subdomains would be handed out as new users signed up.

    I'm likely going to take dalem up on the hosting offer in the not-too-distant future :)
     
Loading...

Share This Page