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.

problem hosting subdomain but not domain

Discussion in 'General Discussion' started by scgroup, Aug 12, 2005.

  1. scgroup

    scgroup Registered

    Joined:
    Aug 12, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have a customer that hosts her own web server; mail and DNS are presently hosted by
    her ISP. I want to set up a webmail system (webmail.herdomain.com) on my VPS.

    In WHM, I added an account for herdomain.com. Of course, the DNS records created
    pointed to my VPS, so I edited the DNS zone, setting the A record for herdomain.com
    to point to her web server, and the MX record to point to the ISP's mail server.
    Then told the registrar to make the root servers point at my VPS. So far, all is
    ok; her web and mail work as before.

    Then, I added the subdomain webmail.herdomain.com. No error was reported, but
    I was surprised to find that the newly created A record for webmail.herdomain.com
    pointed to her web server, not the VPS. No problem, I thought, just edit the A
    record to point to the VPS. Well, the name webmail.herdomain.com is correctly
    resolving to the VPS, but a visit to the page gives error "There is no website
    configured at this address".

    What could be wrong? Subdomains for other domains hosted on this server work fine,
    and I can even access herdomain.com on this server, by adding a local hosts file entry.

    Thanks in advance for any suggestions,

    Stewart
     
  2. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    As you said your subdomain is correctly resolving and pointing to your VPS, you need to check your httpd.conf for proper entries regarding subdomain.
     
  3. scgroup

    scgroup Registered

    Joined:
    Aug 12, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Well, I indeed found that httpd.conf had a NameVirtualHost directive attempting to
    listen on her server's IP (which I commented out), and a VirtualHost directive for the
    subdomain, also specifying her server's IP (which I corrected).

    It's working ok now, but I am worried that because httpd.conf is generated automatically
    by cpanel, when I make changes with cpanel, my fixes will be wiped out.
    If this is true, how can I correct the underlying data?
     
Loading...

Share This Page