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 restart problem

Discussion in 'EasyApache' started by ircmaxell, Mar 3, 2007.

  1. ircmaxell

    ircmaxell Member

    Joined:
    Mar 20, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Something doesn't like Apache running on port 8080. I keep getting restart e-mails every 10 minutes saying that httpd failed. When I look at the apache error log, all it says is that apache starts, and detects that apache.pid has been overwritten. Is there any way I can get apache to play nice with 8080?

    I need apache on 8080, because it's just too memory intensive as my front end server. I want to run lighttpd on port 80 to handle all files but .cgi, .php, .html (I am using mod_rewrite in apache to make my php files look like .html files). I then use mod_proxy to pass the request back to apache if it falls into those three. The site gets a very large amount of request for xml and htm files durring certain times (about 50 requests/second). I can't get apache's children down under 100 megs (after it runs for a few minutes)...
     
    #1 ircmaxell, Mar 3, 2007
    Last edited: Mar 3, 2007
  2. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    My guess is chkservd, which monitor the apache and restart. You can configure to not to monitor using whm i guess.

    hope that helps
     
  3. ircmaxell

    ircmaxell Member

    Joined:
    Mar 20, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Well, I like the monitor... Would there be any way to make it check port 8080 instead of 80? And I would prefer to integrate lighttpd into chkservd as well...
     
  4. ircmaxell

    ircmaxell Member

    Joined:
    Mar 20, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Alright, I've got it fixed... Sorta... I changed /etc/chkserv.d/httpd to watch on 8080 (works fine)... Then I added "lighttpd:1" to /etc/chkservd/chkservd.conf and this to a file lighttpd
    Code:
    service[lighttpd]=80,GET / HTTP/1.0,HTTP/1..,killall -TERM lighttpd;killall -9 lighttpd;/usr/local/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
    It is now killing lighttpd every 8 minutes and restarting it... That entire line (killall -TERM... etc) works from shell... My question is as follows
    1. Why is it killing lighttpd? I've checked the response and it's HTTP/1.0 403 Forbidden, so that should still work with http/1.. right?
     
    #4 ircmaxell, Mar 4, 2007
    Last edited: Mar 4, 2007
Loading...

Share This Page