Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    151
    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,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    You would have to edit httpd.conf and change the DocumentRoot for the subdomain.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    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,679
    Likes Received:
    71
    Trophy Points:
    203
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. tsilihin

    tsilihin Member

    Joined:
    Aug 25, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    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,679
    Likes Received:
    71
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    not a big deal I would support for my customers if the asked see my footer
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. bpmod

    bpmod Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    156
    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:
    151
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice