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.

CNAME's setup?

Discussion in 'General Discussion' started by Finkinstein, Feb 11, 2004.

  1. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Can't find an answer that helps when searching.

    Trying to setup a cname for:

    sub.domain.com to point to domain2.com

    Setup like:

    sub 14400 IN CNAME domain2.com.
    www.sub 14400 IN CNAME domain2.com.

    However, when going to sub.domain.com, I get the "There is no website configured at this address" page.

    How do I setup a CNAME properly?
     
  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 need to add a ServerAlias for the domain...

    Edit /etc/httpd/conf/httpd.conf and look for the VirtualHost container for domain2.com and within that VirtualHost container add:

    ServerAlias sub.domain.com

    Then reload apache:
    /etc/init.d/httpd graceful
     
  3. richy

    richy Well-Known Member

    Joined:
    Jun 30, 2003
    Messages:
    276
    Likes Received:
    1
    Trophy Points:
    16
    You can either do it manually via the DNS configuration and Apache's httpd.conf file - but that'll be foolish (as Cpanel's been designed to do all this for you). At the moment you're failing to configure Apache to recognise the domain name.

    So - scrub out all you've been doing and just:

    Just simply either log into your Cpanel control panel for the existing domain name and select "Parked domains" or, via WHM, add the new domain under "Park a domain"
     
  4. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Foolish can sometimes be using cpanel.
    It isn't flawless. :)

    Errmm... does the cpanel work if domain 2 isn't on our server?
    I'm presuming not because it doesn't seem to be. Which is why i'm trying to set it up as a cname.
     
    #4 Finkinstein, Feb 11, 2004
    Last edited: Feb 11, 2004
Loading...

Share This Page