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.

Viewing site by IP shows default cPanel page

Discussion in 'General Discussion' started by rpertiet, Nov 26, 2007.

  1. rpertiet

    rpertiet Member

    Joined:
    Apr 21, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    When I view my site by IP address I get this page:

    Great Success !
    Apache is working on your cPanel® and WHM™ Server

    How do I change that to correctly show my site instead of the cPanel page? When I view the site by domain name everything works correctly.

    WHM 11.11.0 cPanel 11.15.0-C17853
    CENTOS Enterprise 4.5 i686 on standard - WHM X v3.1.0

    Thanks!
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Are you by chance using the server's shared IP when trying to view this way? Which version of apache are you using? Version 1 and 2 behave slightly differently when accessing IPs directly (especially the shared IP).
     
  3. rpertiet

    rpertiet Member

    Joined:
    Apr 21, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Yes, it turns out that when the host setup my dedicated machine the IP is still set to a shared IP. Can I change this to a dedicated IP and still use the same IP address? If so, how? And Apache 1.3
     
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    What he said...

    Lol - Thanks Linux-Image.

    EDIT: How did my post appear before yours?? lol.
     
    #4 darren.nolan, Nov 27, 2007
    Last edited: Nov 27, 2007
  5. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    open your apache configuration and remove the virtualhost entry for the IP address that has the documentroot set as /usr/local/apache/htdocs and restart apache.

    the main ip of the server is always a shared ip; and just that you know apache serves the content of the documentroot of the first match for the IP address in case you access via ip. so make sure that you have the virtualhost entry for the domain you want to show, as the first entry for the IP at httpd.conf. hope i am clear.
     
  6. rpertiet

    rpertiet Member

    Joined:
    Apr 21, 2007
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Great, thanks!
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Sometimes things get a little weird with server time so messages can occasionally appear 1 place higher than they should appear in the thread.
     
  8. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    What would be the equivalent procedure for Apache 2.2.x to prevent the changes to be overwritten when recompiling.

    /Seb
     
  9. sebby

    sebby Well-Known Member

    Joined:
    Jun 15, 2004
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Anyone? :(
     
  10. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    /usr/local/cpanel/bin/apache_conf_distiller --update

    Alternatively you could make use of the apache includes - but Im not the best person to ask about that - I've not had a need for it yet.
     
Loading...

Share This Page