From owner-freebsd-isp Tue May 29 11:18:25 2001 Delivered-To: freebsd-isp@freebsd.org Received: from EnContacto.Net (adsl-63-205-16-205.dsl.mtry01.pacbell.net [63.205.16.205]) by hub.freebsd.org (Postfix) with ESMTP id 7D50537B424 for ; Tue, 29 May 2001 11:18:19 -0700 (PDT) (envelope-from eculp@encontacto.net) Received: (from root@localhost) by EnContacto.Net (8.11.4/8.11.3) id f4TII3u66182; Tue, 29 May 2001 11:18:03 -0700 (PDT) (envelope-from eculp@encontacto.net) From: Edwin Culp Received: from 63.205.16.202 ( [63.205.16.202]) as user eculp@encontacto.net by Mail.CafeMania.Net with HTTP; Tue, 29 May 2001 11:18:02 -0700 Message-ID: <991160282.3b13e7da2d2c4@Mail.CafeMania.Net> Date: Tue, 29 May 2001 11:18:02 -0700 To: Jan Knepper Cc: Simon , FreeBSD-ISP Subject: Re: Log file rotation with Apache. References: <20010529171239.CB61837B43C@hub.freebsd.org> <3B13D9D2.5060100@digitaldaemon.com> In-Reply-To: <3B13D9D2.5060100@digitaldaemon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs X-Originating-IP: 63.205.16.202 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 Probably a bit simplistic but it has worked for me for a long time. I just run it out of crontab everynight at 11:59 and it doesn't touch apache. #!/bin/sh DATE=`date +%Y%m%d` LOGFILES="httpd-access.log httpd-error.log LOGDIR="/var/log" for i in $LOGFILES do cp /$LOGDIR/$i /$LOGDIR/$i.$DATE >/$LOGDIR/$i /usr/bin/gzip /$LOGDIR/$i.$DATE done Of course you can build on this.:-) ed Quoting Jan Knepper : > Well what I want to solve is the size of the log files. > What I remember from the Webalizer docco is that it will scan .gz log > files. > I run Apache and Webalizer on the same .log files and have not seen any > problems with that yet. > > What my current problem is is that I would like to rotate the apache log > files without having to touch apache. > > Jan > > > > Simon wrote: > > > What we do is rename *.log to *.log.resolve, restart apache, run webalizer > on *.log.resolve. > > > > -Simon > > > > On Tue, 29 May 2001 13:05:32 -0400, Jan Knepper wrote: > > > >> Hi! > >> > >> Does any of you know about a "clean" way to do log file for Apache > >> without disrupting webalizer? > >> > >> I have tried to just run newsyslog on them as I would like this best, > >> but Apache seems to stop logging after the first trim. I know I can > >> reset Apache with a "kill -1", but don't think that's exactly the way I > >> would like to resolve that problem. > >> > >> Thanks! > >> Jan > >> > >> > >> To Unsubscribe: send mail to majordomo@FreeBSD.org > >> with "unsubscribe freebsd-isp" in the body of the message > >> > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-isp" in the body of the message > > > > > > > > ----------------------------------------------------------------------- The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn and relearn. --Alvin Toffler To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message