From owner-freebsd-questions@FreeBSD.ORG Thu Oct 7 20:32:50 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 89D321065674 for ; Thu, 7 Oct 2010 20:32:50 +0000 (UTC) (envelope-from Lowell@Be-Well.Ilk.Org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.53]) by mx1.freebsd.org (Postfix) with ESMTP id 63DF68FC12 for ; Thu, 7 Oct 2010 20:32:49 +0000 (UTC) Received: (qmail 888 invoked from network); 7 Oct 2010 20:06:09 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 7 Oct 2010 20:06:09 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id A312E5083B; Thu, 7 Oct 2010 16:06:08 -0400 (EDT) From: Lowell Gilbert To: Joe Auty References: <4CAE02AB.1090009@netmusician.org> <4439sh507l.fsf@be-well.ilk.org> <4CAE200F.9070202@netmusician.org> Date: Thu, 07 Oct 2010 16:06:08 -0400 Message-ID: <44lj693gzz.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: 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 Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2010 20:32:50 -0000 Joe Auty writes: > Lowell Gilbert wrote: >> Joe Auty writes: >> >>> Hello, >>> >>> I have the following entry for dealing with my Apache log files: >>> >>> /var/log/httpd/* 644 2 * $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. > > Aha! That makes sense... > > What alternatives are there then so that I don't have to type in log > file paths for each of my virtually hosted domains? How about: > > /var/log/httpd/*_log > > > would this work? I was going to say I didn't have time to figure it out, but it only took me a couple of minutes of looking at the source to be (*kind of*) sure that your suggestion *will* work. It shouldn't take more than ten minutes to try it out, anyway. If that doesn't work for you, you could always try generating the newsyslog.conf file from a script. Or try one of the several other logfile-rotating programs. But I think your idea should be good. Good luck.