|
Author: Ralph Meijer
Date: 26-01-00 15:40
Generally you don't want to send a HUP signal to
apache, but a USR1. This lets apache restart
gracefully, waiting for all clients to finish. You can
do this by adding 30 after the pidfile, which is the
number of SIGUSR1.
The problem with this is that it can take a while before
all clients are finished, which causes apache to have
the rotated log file still open while newsyslog is
compressing it. I'm not quite confident that this
preserves all log entries...
Also an additional B for the flags will keep newsyslog
from adding a line to the logfiles (old and new) when
it rotated. This is nice when you need to put the
logfiles through analog or webalizer.
|
|
Reply To This Message
|
|
Author: Dan Langille
Date: 27-01-00 00:59
Ralph,
Thank you for that. Your suggestions have been incorporated into the <a href="http://www.freebsddiary.org/rotatelogs.html">Apache - rotating log files</a> article. Your help is much appreciated.
|
|
Reply To This Message
|
|
Author: Ellert
Date: 02-05-06 18:09
If you have a multitude of logfiles (perhaps one set for each domain you host) you can use the G flag to make the file name into an expression.
For example:
/var/log/httpd/*log root:www 644 7 200 * GB /var/run/httpd.pid 30
Regards,
Ellert.
|
|
Reply To This Message
|
|
Author: Dan
Date: 02-05-06 18:14
Ellert wrote:
> If you have a multitude of logfiles (perhaps one set for each
> domain you host) you can use the G flag to make the file name
> into an expression.
> For example:
>
> /var/log/httpd/*log root:www 644 7 200 *
> GB /var/run/httpd.pid 30
WOW! That's great:
G indicates that the specified logfile_name is a shell pat-
tern, and that newsyslog(8) should archive all filenames
matching that pattern using the other options on this
line. See glob(3) for details on syntax and matching
rules.
--
Webmaster
|
|
Reply To This Message
|
|