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.

Main IP page showing blank index

Discussion in 'General Discussion' started by sneader, Mar 24, 2011.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Tristan. I have a similar but a little different problem.... maybe you can shed some light. I am trying to figure out what the server is using for a doc root for the main IP, since it doesn't appear to be /usr/local/apache/htdocs, as you would expect.

    One my 3 oldest cPanel servers, when I browse to the main IP, for example http://123.123.123.123, I get "Index of /" with no files listed.

    When I tack on a bogus directory or file, like http://123.123.123.123/blahblah, I get a 404 as expected, but I do *not* get an entry in /usr/local/apache/logs/error_log.

    My virtual host entry for the server's main IP in httpd.conf looks like this:


    <VirtualHost 123.123.123.123:80>
    ServerName www5.example.com
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin admin@example.com
    </VirtualHost>


    When I compare settings to my newer cPanel servers, I cannot find anything different (same virtual host entry, but it is correctly pulling up the index.html file in /usr/local/apache/htdocs, so the docroot is working correctly on these servers.

    All cPanel servers are running Apache 2.2, latest Stable, etc.

    Push in the right direction would be cool. Not an urgent issue, or I'd open a ticket.

    Thanks!

    - Scott
     
  2. 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
    Hello sneader,

    I've opened a new thread about this issue as it isn't related to the initial issue. Best to open a new thread whenever possible about such matters.

    The document root should be /usr/local/apache/htdocs with the index.html in that location. Do you have any entry above that one for the main IP in /usr/local/apache/conf/httpd.conf file? Apache will select whatever is the first VirtualHost IP listed in httpd.conf

    Can you try rebuilding Apache and restarting it using these commands (I have a backup being made first before the rebuild)?

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110325
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    Also, could you try checking in a proxy such as proxify.net or kproxy.com to ensure this isn't some type of bizarre caching going on?

    Thanks!
     
  3. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Tristan. I do not see any other VirtualHost entries above the one that I quoted, so I don't think that is it.

    I did the copy / rebuild / restart, and upon restart I get the warning:

    Code:
    [Fri Mar 25 16:37:16 2011] [warn] NameVirtualHost 123.123.123.123:80 has no VirtualHosts
    I sent you a PM with a link to my httpd.conf -- maybe a second set of eyes will sort it out, then we'll document the solution for anyone else that might be having this issue.

    FYI, when I browse to the server name itself, it is definitely using a docroot of /usr/local/apache/htdocs. It's just when we browse to the IP that is apparently using something else (or whatever the issue is)

    Thanks!

    - Scott
     
  4. 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
    Hi Scott,

    Rather than trying to figure this one out via PM, would you be willing to open up a ticket and I'll look at it? You are welcome to post the ticket ID # in a PM. I just rather have the machine login so I don't have to troubleshoot in the dark.

    Thanks :)
     
  5. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Tristan. We were able to figure this out... there was an include file that was causing the problem. You were on the right track, asking if there was another virtualhost entry. I had neglected to examine the include files and one of them had a conflicting entry.

    Thanks for the tip and your willingness to assist!

    - Scott
     
Loading...

Share This Page