From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 15:30:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7092106566B for ; Wed, 20 Aug 2008 15:30:35 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from mx1.identry.com (on.identry.com [66.111.0.194]) by mx1.freebsd.org (Postfix) with ESMTP id 7504C8FC16 for ; Wed, 20 Aug 2008 15:30:35 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 80127 invoked by uid 89); 20 Aug 2008 15:30:34 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 20 Aug 2008 15:30:34 -0000 In-Reply-To: <39DC135F7F0571489196E0B6F5D58B4A03B46071@MWBEXCH.mweb.com> References: <48AC0A7D.80207@lcwords.com> <39DC135F7F0571489196E0B6F5D58B4A03B46071@MWBEXCH.mweb.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <57133960-6A6C-4362-96DC-CD774F24C600@identry.com> Content-Transfer-Encoding: 7bit From: John Almberg Date: Wed, 20 Aug 2008 11:30:31 -0400 To: Rudi Kramer - MWEB X-Mailer: Apple Mail (2.752.3) Cc: Zbigniew Szalbot , User Questions Subject: Re: logrotate question 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: Wed, 20 Aug 2008 15:30:36 -0000 On Aug 20, 2008, at 8:48 AM, Rudi Kramer - MWEB wrote: > >> Zbigniew Szalbot >> Sent: Wednesday, August 20, 2008 2:14 PM >> To: User Questions >> Subject: logrotate question >> >> Dear all, >> >> I am trying to use logrotate from ports and I am getting the >> following >> error. Can anyone offer any insight? > > Hi Zbigniew, > > I started investigating logrotate but someone put me on to newsyslog > instead. > Newsyslog is part of the FreeBSD and amazing simple to setup: > > 1) vi /etc/newsyslog.conf > > 2) Add the following line: > > /var/log/httpd/*.log www:www 644 60 * @T00 BJG > /var/run/httpd.pid > > I would recommend reading man pages newsyslog newsyslog.conf for more > info. > I use newsyslog for other log files, but when I decided I needed to rotate apache logs, recently (see "rotatelogs rotates logs too quickly" thread), I read the following in "Absolute FreeBSD, 2nd edition" "If you simply use newsyslog to rotate your [Apache] logs as you do for other programs, Apache will corrupt its own logs. Apache supports logging to programs, however. I recommend handling your logs via rotatelogs(8), included with Apache." It took me a whole day to switch over to rotatelogs and then investigate some odd behavior, but its working great now. -- John