Current time: 05-03-2024, 03:35 PM Hello There, Guest! (LoginRegister)


Post Reply 
Apache stop without reason
Author Message
rbtux Offline
Moderator
*****
Moderators

Posts: 1,847
Joined: Feb 2007
Reputation: 33
Post: #4
RE: Apache stop without reason
try that

Code:
/var/log/apache2/users/*.log {
  weekly
  missingok
  rotate 52
  compress
  delaycompress
  notifempty
  create 640 root adm
  sharedscripts
  prerotate
    /var/www/ispcp/engine/traffic/ispcp-vrl-traff > /var/log/ispcp/ispcp-vrl-traff.log
  endscript
  postrotate
    /etc/init.d/apache2 reload > /dev/null
  endscript
}

/var/log/apache2/backup/*.log.perv {
  size 5M
  missingok
  rotate 5
  compress
  delaycompress
  notifempty
  create 640 root adm
}

/var/log/proftpd/xferlog {
  daily
  rotate 7
  missingok
  compress
  delaycompress
  postrotate
    if [ -e /var/run/syslogd.pid ]; then
      /usr/bin/killall -HUP syslogd
    elif [ -e /var/run/rsyslogd.pid ]; then
      /usr/bin/killall -HUP rsyslogd
    fi
  endscript
}

/var/log/proftpd/ftp_traff.log {
  daily
  rotate 7
  missingok
  compress
  delaycompress
  prerotate
    /var/www/ispcp/engine/traffic/ispcp-vrl-traff > /var/log/ispcp/ispcp-vrl-traff.log
  endscript
  postrotate
    if [ -e /var/run/syslogd.pid ]; then
      /usr/bin/killall -HUP syslogd
    elif [ -e /var/run/rsyslogd.pid ]; then
      /usr/bin/killall -HUP rsyslogd
    fi
  endscript
}

important part is:

Code:
postrotate
    /etc/init.d/apache2 reload > /dev/null
  endscript

instead of

Code:
postrotate
  for i in `seq 1 10`; do
    if [ -f /var/run/apache2.pid ]; then
      /etc/init.d/apache2 stop > /dev/null
      sleep 5
      /etc/init.d/apache2 start > /dev/null
    fi
  done
  endscript
(This post was last modified: 01-08-2009 10:04 PM by rbtux.)
01-08-2009 10:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Apache stop without reason - Spheerys - 01-08-2009, 08:27 AM
RE: Apache stop without reason - sci2tech - 01-08-2009, 08:33 AM
RE: Apache stop without reason - Spheerys - 01-08-2009, 09:05 AM
RE: Apache stop without reason - rbtux - 01-08-2009 10:02 PM
RE: Apache stop without reason - Spheerys - 01-08-2009, 10:14 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)