Apache logrotate configuration
Why doesn't the logrotate script use apachectl?
recommends that `apache2ctl graceful` be issued after
rotating the logs. I have a password protected ssl
cert and if I issue `apache2ctl graceful` I can do an
unattended restart of the apache2 server. I have to
log in otherwise. Also, apache says doing it this way
won't kill any open connections.
This is my new logrotate.d/apache2 file:
create 640 root adm
if [ -f /var/run/apache2.pid ]; then
The only caveat is you have to wait until connections
are closed before moving the files around. Is this
why debian doesn't do this? It seems that using
apache2ctl graceful would violate the assumption of
total restart or error made by the apache_stop()
routine in /etc/init.d/apache2.
Also, the use in the debian package of the
'delaycompress' option presupposes that the
connections wouldn't be closed. So it looks like
everything would work fine.
Give it a shot.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around