Date: 31 May 2001 10:57:45 -0400 From: Chris Shenton <chris@shenton.org> To: "Simon" <simon@optinet.com> Cc: "Jan Knepper" <jan@digitaldaemon.com>, "FreeBSD-ISP" <freebsd-isp@freebsd.org> Subject: Re: Log file rotation with Apache. Message-ID: <87ofs94lcm.fsf@thanatos.shenton.org> In-Reply-To: <20010529172629.7CA1837B443@hub.freebsd.org> References: <20010529172629.7CA1837B443@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"Simon" <simon@optinet.com> writes: > How often do you run webalizer? i doubt there is a way to > rotate the log files without touching apache. It won't know > what to do once the log file is gone. If you simply rename > and then compress, apache will still append to the same > file and will therefore corrupt it. The supplied "rotatelogs" program is very useful: the logs get piped through it and rotated automatically. The latest release has features to provide more human-friendly naming of rotated log files, and IIRC, more control over when rotation occurs. This means you don't have to stop/start or kill -HUP your daemon, a *major* win. Here's the doc: http://httpd.apache.org/docs/programs/rotatelogs.html Here's how I'm using it on one site (names changed): # Now that I'm using a CustomLog which includes the virtual server # name:port, we can distinguish accesses in the single log file. # Unfortunately we can't do this with ErrorLog, so use separate files # distinguised by filename. Automatically rotate them every 24 hours # to keep size in check. <VirtualHost *:8203> ServerName testing.shenton.org ServerAdmin cshenton@shenton.org DocumentRoot /usr/local/www/data ErrorLog "|/usr/local/www/bin/rotatelogs /usr/local/www/logs/testing.shenton.org:8203_error 86400" CustomLog "|/usr/local/www/bin/rotatelogs /usr/local/www/logs/access_log 86400" virtual </VirtualHost> I too am curious if webalizer can deal with this: can I just point it at my current log file (access_log) as well as the rotated ones with the UNIX timestamp-suffix? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ofs94lcm.fsf>