quoth the Guilheme Cirne:
> On Thursday 17 February 2005 16:42, Grant wrote:
> <...>
>
> > My log config sections are like this:
> >
> > /var/log/apache2/access_log {
> > daily
> > rotate 99
> > postrotate
> > /etc/init.d/apache2 restart
> > endscript
> > }
> >
> > for access_log, ssl_access_log, ssl_request_log, error_log, and
> > ssl_error_log with apache2 restarting for each. I'm thinking that is
> > pretty bad. Can anyone give me any pointers on this?
>
> You could do something like this:
>
> /var/log/apache2/access_log /var/log/apache2/ssl_access_log
> /var/log/apache2/ssl_request_log, error_log /var/log/apache2/ssl_error_log
> {
> daily
> rotate 99
> sharedscripts
> postrotate
> /etc/init.d/apache2 restart
> endscript
> }
Or more succinctly:
/var/log/apache2/*log
{
daily
rotate 99
sharedscripts
postrotate
/etc/init.d/apache2 restart
endscript
}
> The sharedscripts option means that the postrotate script will only be
> executed once for all files. So apache will only be restarted once.
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
pgp7nruW5lXLF.pgp
Description: PGP signature
