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.

WHM thinks apache is not running

Discussion in 'EasyApache' started by corey_s, Jul 29, 2005.

  1. corey_s

    corey_s Member

    Joined:
    Apr 6, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    We're currently having issue with WHM reporting that the apache service is not running - even though it actually is running without any issue. I ssh'd into our server and manually stopped/restarted apache and watched the logs, and everything is fine.

    The 'Service Status' shows apache as 'failed', and the 'Apache Status' shows nothing than an entirely blank page.

    Any idea what the deal is? How can we fix this?

    We're running WHM vers. 9.9.9 - yes we're going to upgrade soon.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Try restarting chkservd:

    /etc/init.d/chkservd restart
     
  3. corey_s

    corey_s Member

    Joined:
    Apr 6, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Thankyou for your response!

    I had just now finally narrowed it down to chkservd, which constantly restarts apache - I'm unable to determine why it tries to restart apache even though it is running just fine.

    /var/run/chkserv/apache always contains a '-' rather than a '+', if I remove that file or modify it to show '+', chkservd just changes it back when it runs again.

    HEre's what /etc/chkserv.d/apache looks like:

    Code:
    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
    service[apache]=80,GET / HTTP/1.0,HTTP/1..,/scripts/checkmaxclients;killall -TERM httpd;sleep 4;killall -9 httpd;/etc/rc.d/init.d/httpd stop;/etc/rc.d/init.d/httpd startssl;/usr/local/apache/bin/apachectl startssl;/etc/rc.d/init.d/httpd*start;/usr/local/apache/bin/apachectl start
    

    And in my apache.conf, I've tried the following, but does not help or change anything:

    Code:
    <Location /whm-server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>
    <Location /server-status>
     SetHandler server-status
     Order deny,allow
     Deny from all
     Allow from localhost
    </Location>
    ExtendedStatus On
    

    Thank you very much for your help!
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On the server, type:

    telnet 127.0.0.1 80

    then type:

    GET / HTTP/1.0

    and hit [enter] twice. You should get a load of HTML, in particular with the following near the top:

    HTTP/1.1 200 OK

    If you don't then apache is not responding to 127.0.0.1 which is what chkservd is using to make sure that apache is up and running.
     
  5. corey_s

    corey_s Member

    Joined:
    Apr 6, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Ok - looks like we got Darwin Streaming Server running on localhost; which explains the problem. Thanks for your assistance!


     
  6. corey_s

    corey_s Member

    Joined:
    Apr 6, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I fixed one part of the issue by modifying the /usr/sbin/chkservd script to hit the server's primary ip rather than than the loopback interface when it checks the apache service.

    However, the only issue now is that the 'Apache Status' page still shows up as being blank... how/where does whm get this info? Is it in a file somewhere? Does it get dynamically updated periodically?

    Thanks!
     
    #6 corey_s, Jul 29, 2005
    Last edited: Jul 29, 2005
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It may well be built into the WHM binary to connect on 127.0.0.1 which would cause it to come up blank in your situation.
     
Loading...

Share This Page