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.

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:
    1
    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:
    817
    Likes Received:
    22
    Trophy Points:
    18
    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
     
  3. commodity22

    commodity22 Registered

    Joined:
    Jun 13, 2011
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0
    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:
    1
    Thanks. This worked.
     
Loading...

Share This Page