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!

How to Create Sub-Domain

Discussion in 'General Discussion' started by ls41, Jun 10, 2011.

  1. ls41

    ls41 Registered

    Joined:
    Jun 10, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    I'm getting my feet wet with cpanel/whm and server administration.

    Primary domain example.com is working
    Trying to create forums.example.com with DocumentRoot pointing to public_html/forums/ I don't want separate cpanel account for forums.example.com

    EDITED A Record for forums.example.com which points to same IP as example.com (say 1.2.3.10)
    Previously it was pointing to different IP Address (say 1.2.3.4)

    When I load forums.example.com its now redirecting to example.com
    So, I assume there are no DNS errors, but Virtual Host is not configured.

    When I checked /etc/httpd/conf/httpd.conf
    Old IP address is still there (1.2.3.4)

    So, I assume that httpd.conf have to rebuild. But, I'm not sure how to do that? Is there a corn job that will update httpd.conf periodically or I have to do it manually?

    After reading some topics here, I realized Easyapache in WHM can be used to rebuild apace. but, ther are way too many options in easyapache for me to mess around.

    So, what should I do next?

    Thanks
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    834
    Likes Received:
    29
    Trophy Points:
    178
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Go into /var/cpanel/userdata/$user/$subdomain and change the IP there, then do /scripts/rebuildhttpdconf and restart Apache
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. commodity22

    commodity22 Registered

    Joined:
    Jun 13, 2011
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    50
    If you have the top level domain name active creating the subdomain in Cpanel should not be a problem. Like example.com you would put xxxx.example.com and then wait a little bit the subdomain should appear with ease.
     
  4. ls41

    ls41 Registered

    Joined:
    Jun 10, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Thanks. This worked.
     
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