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.

Get default web site when trying to create new account.

Discussion in 'General Discussion' started by mwc, Apr 4, 2011.

  1. mwc

    mwc Member

    Joined:
    Apr 4, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    I'm on the WHM trial and am trying to add a new account. I add the account, test.xxx.xxx, then redirect that to my WHM server.

    I then upload an index.htm file to the public_html/ folder of that user and set the permission correctly so its accessable to the web server. When I try to access the web site, it now gives me the default web page still. Am I doing something wrong? how do i get the page to be accessable?
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The reason for the default page is that Apache is receiving a request for the domain on an IP address on which the domain is not configured.

    To give you an example, if I create a new account in the WebHost Manager and give it IP address 1.1.1.1, but the DNS records for the domain point the domain to 1.1.1.2, which is on the same server, and I try to browse the domain, I will see the default page, not the index page for the site I created. It is not enough for a domain to simply resolve to an IP address that happens to be on the server; it must resolve to the exact IP address on which the account is configured in the WHM.

    You will need to find the IP address to which the domain resolves (you can do this using the host command at a Linux command prompt), and compare it to the IP address on which the account is configured in the WHM.

    If you happen to be using NAT, this will further complicate the situation. If NAT is used, the account needs to be configured on the internal IP address, not the external one to which the internal IP address is mapped, but the DNS zone still needs to point the domain to the external IP address.
     
  3. mwc

    mwc Member

    Joined:
    Apr 4, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    ok, so I've got my site set up on the external address, which is pointing to my WHM server. However, the server is still set up to have an internal IP address (192.168.*) as its primary address, with an external address that points to it and all traffic that is routed to that IP address ends up at my server, however it still needs to be set up with the internal IP address as its primary. Is there any way to set domains up on this server, if so, how would I set up the httpd.conf file?

    I've set the virtual host up on both the internal and external IP address now, and I still get the same problem
     
    #3 mwc, Apr 4, 2011
    Last edited: Apr 4, 2011
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You need to change the IP address for the account to the internal IP address. Use Main >> Account Functions >> Change Site's IP Address in the WebHost Manager to do this. You do not need to manually edit any files at this point.

    The above step will change the A records in the DNS to the internal IP address, so use Main >> DNS Functions >> Edit DNS Zone to change the A records for the domain to point to the external IP address.

    Manually editing files is discouraged because any manual changes, especially to the httpd.conf file, are likely to be changed back when cPanel is updated.

    The issue you are encountering is the reason why we say that cPanel does not support NAT. It is not "NAT-aware", i.e. it does not have any provision built into it for understanding internal vs. external IP addresses. While some users are able to successfully configure and administrate cPanel in a NAT environment, we recommend not using NAT if at all possible, because it adds another layer of complexity to the system.
     
  5. mwc

    mwc Member

    Joined:
    Apr 4, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Ok, so this won't work through NAT, however all I want to do at the moment is set up a default web site that can be accessed from the server for all domain names. How do I do this on Cpanel without setting it up as a domain or user within the software? At the moment any time I try this I still get the default redirect. and the Cpanel software doesn't accept * as a domain name.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    To clarify, you want one location to show for all domains on the machine? Is this a parked page? If so, you should create a parked page for all new site content to use in WHM > Web Template Editor area.

    If you want the redirected page for non-configured domains to show something else (to go to another site), you could edit /usr/local/apache/htdocs/index.html file to change the redirection there to another site or put different content entirely in the page.

    If neither of the above is what you are wanting to do, then please clarify what you are needing to do with the configuration precisely.
     
  7. Vijay James

    Vijay James Member

    Joined:
    Apr 6, 2011
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I am also receiving the same error these days whenever I add a new account, or whenever I add a new subdomain through cpanel. To get to the bottom of this issue, I have checked the apache config file, there I could see that the site is assigned with the shared IP address for the server. the subdomain is also assigned with the same IP address. The site is also pointing to the same IP address when I ping the domain from my local machine.

    There are no .htaccess rules and whenver I enter the name of the domain it gets automatically redirected to domainname/cgi-sys/defaultwebpage.cgi
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Without access to the machine, it's difficult to troubleshoot the issue as we would need to see what is happening. Please submit a ticket using WHM > Support Center > Contact cPanel or using the link in my signature.

    Offhand, it almost sounds like Apache isn't restarting when a new site is being added, but that would require access to the system to see if that's the case or not.
     
  9. synik4l

    synik4l Member

    Joined:
    Feb 20, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Did you guys ever get this figured out? I'm having this same problem. I dont have a domain setup yet. I just have the VPS setup. And I havent made an account. I'm just logging into CPanel with root. Used EasyApache to get the config setup. And it seems apache is running. Its just whenever i type the ip of ht tp://209.59.212.20. I get redirected to that same default page. domainname/cgi-sys/defaultwebpage.cgi
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If you haven't setup a domain yet, you'll only show the default page when hitting the main IP address. You'll hit that IP even after you do setup a site as the shared main IP defaults to the Apache default page at /usr/local/apache/htdocs/public_html/index.html location, which simply redirects to the cPanel page.
     
  11. synik4l

    synik4l Member

    Joined:
    Feb 20, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Okay i added my primary domain and it works perfectly. /http://synibox.info but i added the domain /kronkness.com and im getting the default page again. Have the domains pointed to /VPSlink.com's dns servers and then in the vpslink control panel i have the domains pointing the home directory. And if u check the ~user's the index's are there but if you check the domain its pointing the default page. Anyone have any idea whats going on with this?
     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I'm getting a site at kronkness.com location and not a default page (it has Kornkess | Joels Blog as the title for example). After you added the site, did you check in a proxy in case you were previously cached for that domain? You might also check any domain you add in a proxy to avoid possible caching. proxify.net and kproxy.com are two proxy locations that you might use for checking.
     
Loading...

Share This Page