From owner-freebsd-questions@FreeBSD.ORG Mon Mar 5 19:52:28 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D367F16A402 for ; Mon, 5 Mar 2007 19:52:28 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by mx1.freebsd.org (Postfix) with ESMTP id 83EED13C441 for ; Mon, 5 Mar 2007 19:52:28 +0000 (UTC) (envelope-from david.robillard@gmail.com) Received: by nz-out-0506.google.com with SMTP id r28so1931406nza for ; Mon, 05 Mar 2007 11:52:27 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bgyCdi058DEqoRuOf51yVGpXa5hFghAm7aYXrdozMuME/9jWh73IsrIdOUwji+Zh0/WoO4W8ck1mdpQj/aWrhifqGTnjI3JwTMR0Napk8QfA//OjVCBv0Hv4BVLzQ+OZ9RLtc0HoNwaP/JMbGavgDLeXHoWozs4mEt1DAaPvN+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pJ7qDbqWEP3WWS6+VX7IhBqFphsND9ZUCP+SJZxktn1PD/RbJcG/Qmhih6LliYjy+DqCD6nrnF7QdoyRff2I90wSG7GyO9sC3UU4DbnDukoOU84vTkLf0GLo+raQXD4mMGvUYMyUCO2DsCbTTtbOgnAasIu7uo0wTIFJT8Bk1ME= Received: by 10.65.219.1 with SMTP id w1mr10485597qbq.1173124347509; Mon, 05 Mar 2007 11:52:27 -0800 (PST) Received: by 10.64.210.7 with HTTP; Mon, 5 Mar 2007 11:52:27 -0800 (PST) Message-ID: <226ae0c60703051152h183fca79k470d2b064d871ccf@mail.gmail.com> Date: Mon, 5 Mar 2007 14:52:27 -0500 From: "David Robillard" To: peter@placidpublishing.net In-Reply-To: <45EC6BF3.9090606@placidpublishing.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <226ae0c60703051056ofb18dffu1ea0b9d48297b0bf@mail.gmail.com> <45EC6BF3.9090606@placidpublishing.net> Cc: FreeBSD Questions Subject: Re: Apache Rotate Logs and Log Rotate. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2007 19:52:28 -0000 On 3/5/07, Peter Pluta wrote: > Thanks, David. I had already configured it like that the first time > around after reading up on it a bit. Most articles/tips I have read say > to wait 10 minutes or so and then compress the logs with a shell script > in order to be sure Apache finished logging to the files. Another thing, > just to be sure. If I had 30 vhosts on my server and each had logs in > their home directory, I would still use newsyslog to rotate and delete > them, correct? I assume one needs tons of disk space to do that if the > sites are rather large. Well, if you do use newsyslog to rotate Apache log files, then it's just a matter of setting the number of files you whish to keep. From newsyslog.conf(5) count Specify the maximum number of archive files which may exist. This does not consider the current log file. Let's say you rotate your files once they reach 2Mb for example and that you've configured 10 in your newsyslog,conf field. Then that means a maximum of 10 x 2Mb = 20Mb will be kept for one VirtualHost. Now if you have 100 virtual hosts all configured this way, then you will need 100 x 20Mb = 2000Mb or 2Gb for all your Apache logs. Considering today's disk drive sizes are well beyond the 300Gb, I don't think this is a problem at all. Of course, YMMV so check your own needs and do the math. Cheers, David -- David Robillard UNIX systems administrator & Oracle DBA CISSP, RHCE & Sun Certified Security Administrator Montreal: +1 514 966 0122