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!

File does not exist: /usr/local/apache/htdocs/whm-server-status

Discussion in 'EasyApache' started by linux4me, Nov 14, 2007.

  1. linux4me

    linux4me Member

    Joined:
    Jul 14, 2007
    Messages:
    20
    Likes Received:
    1
    Trophy Points:
    53
    After a recompile I am getting the following error:
    It is apparently being called by the server itself, not by anyone accessing the server status from within WHM:
    I found this post and tried changing the path as described in /etc/init.d/httpd, then restarting Apache, but I still go the same error.

    So, it looks like chkservd is looking for this file every few minutes and can't find it. How do I fix this? Is there some other place where the path to the file is set that needs to be changed?

    Thanks.
     
  2. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    Hello,

    What does this output:
    /usr/local/apache/bin/httpd -v
     
  3. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    I ask because IIRC it used to be an option but now the patch is applied all the time:

    http://httpupdate.cpanel.net/cpanelsync/easy/Cpanel/Easy/Apache/1.pm
    dryrun 0.5

    http://httpupdate.cpanel.net/cpanelsync/easy/Cpanel/Easy/Apache/2.pm
    dryrun 0

    http://httpupdate.cpanel.net/cpanelsync/easy/Cpanel/Easy/Apache/2_2.pm
    dryrun 0.2

    so either it was built when it was optional and it was off *or* htdocs is mishandled. I'll do a build and specifically watch it.
     
  4. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    Sorry, its not in htdocs, my mistake.

    If it does not work then either it was built with that option off (built a while ago) or httpd.conf doesn't have it set up:

    [root@ea3ap20 ~]# grep -A 5 whm-server-status /usr/local/apache/conf/httpd.conf
    <Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Location>
    [root@ea3ap20 ~]#


    This command:
    curl http://localhost/whm-server-status

    should dump a bunch of HTML with server status info.
     
  5. linux4me

    linux4me Member

    Joined:
    Jul 14, 2007
    Messages:
    20
    Likes Received:
    1
    Trophy Points:
    53
    Thanks for the replies. I'm not sure I follow you, but here goes.

    When I run this:
    Code:
    grep -A 5 whm-server-status /usr/local/apache/conf/httpd.conf
    I get no output.

    When I run this:
    Code:
    curl http://localhost/whm-server-status
    I get:
    What do I need to do?
     
  6. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    Your httpd.conf is not properly setup, (that section is pretty well hardcoded in the template not sure how it could be removed)

    /usr/local/cpanel/bin/apache_conf_distiller --update --main
    /usr/local/cpanel/bin/build_apache_conf
     
  7. linux4me

    linux4me Member

    Joined:
    Jul 14, 2007
    Messages:
    20
    Likes Received:
    1
    Trophy Points:
    53
    It's getting weird.

    When I run:
    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update --main
    I get:
    When I run:
    I get no output.

    I should tell you that I tried to recompile Apache using WHM yesterday, and fubarred it. I had to submit a support ticket (223886) and Dave pulled me out of the flames by recompiling it. In the process of troubleshooting the original problem, I had found that apache_conf_distiller was missing then, too. Possibly since this server was originally set up...

    What do I do about that?
     
  8. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    Oh, then you do not have ea3, in that case just add

    <Location /whm-server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Location>

    to httpd.conf and restart apache
     
  9. linux4me

    linux4me Member

    Joined:
    Jul 14, 2007
    Messages:
    20
    Likes Received:
    1
    Trophy Points:
    53
    I had a section in httpd.conf like this:
    Instead of uncommenting it, I added the section you suggested with the "whm-server-status" and it seems to have fixed the problem. No more error messages!

    Thanks for your help and your patience.
     
  10. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    716
    Likes Received:
    8
    Trophy Points:
    243
    no problem, yep someone commented it out, thats why it didn't work :)
     
Loading...

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