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.

apache problem

Discussion in 'EasyApache' started by poops, May 6, 2006.

  1. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    when i run the command
    service httpd status
    then it happens like the following

    Looking up localhost
    Making HTTP connection to localhost
    Alert!: Unable to connect to remote host.

    lynx: Can't access startfile http://localhost/server-status




    and on whm when i try to know the status of apache then


    -
    -
    -
    -

    Unable to retrieve apache status [a fatal error or timeout occurred while processing this directive]
     
  2. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    Its not a problem at all. You havnt enabled the status in httpd.conf that all.
     
  3. poops

    poops Member

    Joined:
    May 6, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    httpd problem

    which kind of stats in httpd.conf file
    is that
    Allow server status reports generated by mod_status,
    # with the URL of http://servername/server-status
    # Change the ".example.com" to match your domain to enable.
    #
    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from example.com
    </Location>
     
  4. sv1

    sv1 Well-Known Member

    Joined:
    Aug 31, 2003
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    how does one go about fixing this?
     
  5. carock

    carock Well-Known Member

    Joined:
    Sep 25, 2002
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    St. Charles, MO
    It's that way by default. WHM Apache Status can be gotten from a command line though.

    You must realize that WHM/cPanel and Apache web sessions are served from two separate applications. The changes to the Apache httpd.conf do not affect cPanel/WHM web pages.

    I don't know if you need to have the status available publicly, but I wouldn't.

    Here's how I use the command line to log the apache status in my cron job.

    apache-status.pl

    -----
    #!/usr/bin/perl

    @output = `lynx -width=190 -dump http://127.0.0.1/whm-server-status`;

    print @output;

    ----

    If you just want to see it from command line, you can just type this line.

    lynx -width=190 -dump http://127.0.0.1/whm-server-status

    I also will sometimes under high loads run this command to see if there's a bunch of concurrent connections from the same IP.

    lynx -width=190 -dump http://127.0.0.1/whm-server-status | sed -n 55,204p | awk '{print $11}' | sort -n

    You may need to adjust the numbers after the sed command depending on how many lined the server-status puts out. I have one server that puts out a different number than another.

    Chuck
     
    #5 carock, Sep 16, 2006
    Last edited: Sep 16, 2006
Loading...

Share This Page