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 www (cname fix not working)

Discussion in 'General Discussion' started by tao700, May 17, 2003.

  1. tao700

    tao700 Registered

    Joined:
    May 7, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Having trouble getting subdomains to resolve with www. in front of the subdomain.

    I have tried adding a CNAME record but when I call the www.subdomain.maindomain.com the browser just serves the generic Apache test page not the real subdomain.maindomain.com index page.


    This is how I set up the CNAME Entry:

    In WHM - DNS Function - Edit DNS Zone

    Select the DNS Zone which has the subdomain you want. Add the CNAME Entry

    www.subdomain.maindomain.com. IN CNAME subdomain.maindomain.com.

    as suggested by senior member parag in the thread "how to make subdomains work with www"
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You must also add the ServerAlias for the www.sub.domain.com to the httpd.conf for that sub.domains.com's area.

    like so;

    <VirtualHost xxx.xxx.xxx.xxx>
    ServerAlias www.sub.domain.com sub.domain.com
    BytesLog domlogs/sub.domain.com-bytes_log
    User username
    Group grpname
    ServerName sub.domain.com
    ServerAdmin wwwadmin@domain.com
    DocumentRoot /home/username/public_html/sub
    CustomLog domlogs/sub.domain.com combined
    ScriptAlias /cgi-bin/ /home/user/public_html/sub/cgi-bin/
    </VirtualHost>
     
  3. macdabby

    macdabby Member

    Joined:
    Aug 5, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    same thing here

    I am having the same problem. It seems that www.domain.com works SOMETIMES on only SOME domains! i checked httpd.conf, and www.domain.com is listed in there right before domain.com. What else could be wrong? Is there software that needs to be updated? I am pretty sure I have the latest stable builds of everything
     
Loading...

Share This Page