From owner-freebsd-questions@FreeBSD.ORG Fri Jul 9 02:46:40 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83E0916A4CE for ; Fri, 9 Jul 2004 02:46:40 +0000 (GMT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CDA743D53 for ; Fri, 9 Jul 2004 02:46:40 +0000 (GMT) (envelope-from wmoran@potentialtech.com) Received: from working.potentialtech.com (pa-plum-cmts1e-68-68-113-64.pittpa.adelphia.net [68.68.113.64]) by internet.potentialtech.com (Postfix) with ESMTP id 186CB69A39; Thu, 8 Jul 2004 22:46:38 -0400 (EDT) Date: Thu, 8 Jul 2004 22:46:37 -0400 From: Bill Moran To: "Graham North" Message-Id: <20040708224637.2c909d1b.wmoran@potentialtech.com> In-Reply-To: <002401c4655c$ecd47640$627ba8c0@phoenix> References: <002201c45111$801acb30$627ba8c0@phoenix> <20040613090822.GB75168@happy-idiot-talk.infracaninophile.co.uk> <003901c45197$9feda640$627ba8c0@phoenix> <20040616103837.GC3094@happy-idiot-talk.infracaninophile.co.uk> <002401c4655c$ecd47640$627ba8c0@phoenix> Organization: Potential Technologies X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: robert@irrelevant.com cc: tim@typhoon.techvalley.ca cc: freebsd-questions@freebsd.org cc: matthew@cryptosphere.com Subject: Re: Apache log rotation problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 02:46:40 -0000 "Graham North" wrote: > Hello all: > > There has to be a simple fix to this problem - I am using newsyslog and cron > to rotate my Apache logfiles. They get rotated and Apache keeps working > however after a log rotation takes place Apache will not longer log my > accesses. It does continue to serve pages but I need to do an apachectl > restart in order for it to continue logging properly. > > newsyslog.conf and crontab files are attached for reference. You need to restart apache to get it to start logging to a new file. Luckily, newsyslog can do this for you. With the default Apache install, Apache will log its PID to a file when it starts, just add this filename (/var/run/httpd.pid) to the end of each newsyslog entry that rotates an apache file, and newsyslog will automatically send a HUP signal to that PID when the log file is rotated See the man pages for newsyslog for more detailed info. -- Bill Moran Potential Technologies http://www.potentialtech.com