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.

httpd not restarting

Discussion in 'General Discussion' started by Lem0nHead, Dec 8, 2005.

  1. Lem0nHead

    Lem0nHead Well-Known Member

    Joined:
    Sep 2, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    hello

    I don't know if it's cause or consequence, but I noticed that many times (usually once a week or once two weeks), httpd suddenly stops and refuses to restart... then I check the httpd main logs dir ( /etc/httpd/logs )and it was just rotated (all files around 0 bytes)
    probably because it didn't stopped correctly
    then I need to to a "service httpd stop; killall httpd; service httpd start" and it works

    so I'd like to know if this can have something to do with log rotation...

    thanks
     
  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
    It could be that the postrotate action for httpd logs isn't working correctly. Check the files in /etc/logrotate.d/. This is what I use in a file called httpd for logrotate:
     
  3. PDM

    PDM Active Member

    Joined:
    Jan 7, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Angel Fire, NM
    I've read that the first line in /etc/logrotate.d/httpd should have this:

    /usr/local/apache/logs/*log {

    What's the Chirpy's opinion on this?

    Should it read like this?

    /etc/httpd/logs/*log /usr/local/apache/logs/*log {
     
  4. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Mine reads:

    But /etc/httpd/logs/*log should work also as /etc/httpd is a sym link to /usr/local/apache anyway.

    :)
     
    #4 Izzee, Jan 4, 2006
    Last edited: Jan 4, 2006
Loading...

Share This Page