Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

using default domain when visiting direct IP instead of host name?

Discussion in 'General Discussion' started by kazimir82, May 9, 2011.

  1. kazimir82

    kazimir82 Member

    Apr 15, 2011
    Likes Received:
    Trophy Points:
    Suppose I have a dedicated IP for my VPS, and default domain name "".

    I also have some addon domains, which resolve to the same IP. When browsing to either the main domain name or an addon domain, Apache and/or cPanel (not sure which?) will be able to tell which site (i.e. which document root) to use, depening on the host/domain name I used in the URL.

    However, if I browse directly to the IP, e.g. I get the default "Apache is working on your cPanel® and WHM™ Server" page.

    Can I somehow configure things so that users visiting are getting the site for the default domain? (that is, the same as, rather than the default cpanel/apache page)

    Note: I don't necessarily mean redirect them to (although that would be OK as well), but I mean actually getting the main site by its IP (instead of the domain name it resolves to).
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    A dedicated IP would generally function on the first site listed under that IP in httpd.conf for the VirtualHost entry. The only times this isn't the case are when a) the shared IP is being used which has the document root for /usr/local/apache/htdocs location, or b) the IP isn't bound to the machine and so any unbound IPs will default to /usr/local/apache/htdocs location.

    If your dedicated IP is not showing the first site listed with that IP in /usr/local/apache/conf/httpd.conf file, then please open up a ticket for us to troubleshoot further. You may open up a ticket using WHM > Support Center > Contact cPanel or via the link in my signature.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice