From owner-freebsd-isp Thu May 31 7:57:53 2001 Delivered-To: freebsd-isp@freebsd.org Received: from Thanatos.Shenton.Org (a3.ebbed1.client.atlantech.net [209.190.235.163]) by hub.freebsd.org (Postfix) with SMTP id 82CBD37B423 for ; Thu, 31 May 2001 07:57:50 -0700 (PDT) (envelope-from chris@Shenton.Org) Received: (qmail 47643 invoked by uid 1000); 31 May 2001 14:57:45 -0000 To: "Simon" Cc: "Jan Knepper" , "FreeBSD-ISP" Subject: Re: Log file rotation with Apache. References: <20010529172629.7CA1837B443@hub.freebsd.org> From: Chris Shenton Date: 31 May 2001 10:57:45 -0400 In-Reply-To: <20010529172629.7CA1837B443@hub.freebsd.org> Message-ID: <87ofs94lcm.fsf@thanatos.shenton.org> Lines: 37 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org "Simon" 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. 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 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