From owner-freebsd-questions@FreeBSD.ORG Thu Oct 7 20:48:19 2010 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 63CBB106566B for ; Thu, 7 Oct 2010 20:48:19 +0000 (UTC) (envelope-from gull@gull.us) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0110C8FC08 for ; Thu, 7 Oct 2010 20:48:18 +0000 (UTC) Received: by ewy27 with SMTP id 27so27318ewy.13 for ; Thu, 07 Oct 2010 13:48:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.31.203 with SMTP id z11mr863850ebc.88.1286484497747; Thu, 07 Oct 2010 13:48:17 -0700 (PDT) Received: by 10.14.29.76 with HTTP; Thu, 7 Oct 2010 13:48:17 -0700 (PDT) X-Originating-IP: [64.81.163.112] In-Reply-To: <4439sh507l.fsf@be-well.ilk.org> References: <4CAE02AB.1090009@netmusician.org> <4439sh507l.fsf@be-well.ilk.org> Date: Thu, 7 Oct 2010 13:48:17 -0700 Message-ID: From: David Brodbeck To: Lowell Gilbert Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Joe Auty , freebsd-questions@freebsd.org Subject: Re: newsyslog.conf and Apache log files 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: Thu, 07 Oct 2010 20:48:19 -0000 On Thu, Oct 7, 2010 at 11:25 AM, Lowell Gilbert wrote: > Joe Auty writes: > >> Hello, >> >> I have the following entry for dealing with my Apache log files: >> >> /var/log/httpd/* =A0 =A0 =A0 =A0 =A0 =A0 644 =A02 =A0 =A0 * =A0$M1D0 GBJ >> /var/run/httpd.pid 30 >> >> >> Unfortunately, this has created these big long log files such as the >> following: >> >> httpderror_log.2.bz2.2.bz2.2.bz2.1.bz2.1.bz2.1.bz2.0.bz2 >> >> How can I prevent these dumb log file names from being created? > > Don't use wildcards in newsyslog.conf. > > What's happening is "httperror_log.2.bz2" gets rotated into > "httperror_log.2.baz2.1.bz2", because it matches the filename > glob you specified. One alternative might be to use newsyslog's -a option to put the archived logs in a separate directory, where the glob won't find them. Unfortunately there doesn't seem to be a way to define this on a per-file or per-directory basis, so it would apply to *all* your logs.