From owner-freebsd-stable@FreeBSD.ORG Fri Nov 25 02:09:56 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 992FC16A431 for ; Fri, 25 Nov 2005 02:09:56 +0000 (GMT) (envelope-from hangdog@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id A99FD43D45 for ; Fri, 25 Nov 2005 02:09:55 +0000 (GMT) (envelope-from hangdog@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so387843nzd for ; Thu, 24 Nov 2005 18:09:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ThR46Poe6nHmy0N6Sbjxb+88u8B4lWMRzXVVOwwcF1V7hnIutZIWsb5ZRM8lAXRw+yUr7AAPBADUfspRV6qMEGCzgUi7rzFxwtwERblnf7NZ3u1mdNYz4BjtHC3IFDNxCYVg2qa5NluVLKFhj/MpWpIsbV0/fFqQx6rGwKMpBLc= Received: by 10.65.253.5 with SMTP id f5mr7830085qbs; Thu, 24 Nov 2005 18:09:55 -0800 (PST) Received: by 10.64.204.20 with HTTP; Thu, 24 Nov 2005 18:09:55 -0800 (PST) Message-ID: Date: Fri, 25 Nov 2005 10:09:55 +0800 From: Calvin OnEarth To: Philip Murray In-Reply-To: <11EEE0FE-A7DC-4585-BF05-6FE3B73D5D97@nevada.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200511250845.43542.distro.watch@msa.hinet.net> <11EEE0FE-A7DC-4585-BF05-6FE3B73D5D97@nevada.net.nz> Cc: freebsd-stable@freebsd.org Subject: Re: Rotating web server logs without restarting Apache X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 02:09:56 -0000 My very non-orthodox way is to:- 1) copy the entire content of the log file out for storage, renamed according to date. 2) cat /dev/null to the apache logfile On 11/25/05, Philip Murray wrote: > On 25/11/2005, at 1:45 PM, Ladislav Bodnar wrote: > > Is there a way for Apache (version 2.0.55 on FreeBSD 6.0) to write > > to the > > new log file without the need to restart it? I restart it routinely > > from a > > cron job, but occasionally Apache fails to restart (or more > > precisely, if > > fails to shutdown completely before it is told to come up again). > > Look at sysutils/cronolog in ports. Apache logs to cronolog via a > pipe and cronolog will do rotation for you without needing to restart > Apache. > > Cheers > > Phil