From owner-freebsd-questions Fri Jul 28 17:46:12 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 9F6B137BCE3 for ; Fri, 28 Jul 2000 17:46:03 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.15 #1) id 13IJam-000CAy-00; Sat, 29 Jul 2000 00:31:00 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.15 #1) id 13IJam-000OAQ-00; Sat, 29 Jul 2000 00:31:00 +0100 Date: Sat, 29 Jul 2000 00:30:59 +0100 From: Ben Smithurst To: Dan Nelson Cc: Meagan Jia Pi , freebsd-questions@FreeBSD.ORG Subject: Re: newsyslog question Message-ID: <20000729003059.Y59315@strontium.scientia.demon.co.uk> References: <06f101bff8e2$75863410$e293c83f@meagan> <20000728173309.A24051@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000728173309.A24051@dan.emsphone.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dan Nelson wrote: > In the last episode (Jul 28), Meagan Jia Pi said: >> Hi all, >> >> How do I make newsyslog to rotate apache logs every month? >> The man page is confusing to me. >> Thanks in advance. > > Copy the wtmp line: > > /path/to/my/apachelog 644 7 * @01T00 Z > > will rotate on the 1st of each month at midnight Don't forget that you'll need to restart Apache at the same time ("apachectl graceful" in cron, I guess), otherwise it will keep logging to the old file. Alternatively it looks as if newsyslog supports specifying a pid file anyway, so I guess you could use: /path/to/my/apachelog 644 7 * @01T00 Z /var/run/httpd.pid -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D FreeBSD Documentation Project / To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message