From owner-freebsd-questions@FreeBSD.ORG Thu Oct 7 20:56:34 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 DF2A51065673 for ; Thu, 7 Oct 2010 20:56:34 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail3.sea5.speakeasy.net (mail3.sea5.speakeasy.net [69.17.117.42]) by mx1.freebsd.org (Postfix) with ESMTP id B6FA28FC14 for ; Thu, 7 Oct 2010 20:56:34 +0000 (UTC) Received: (qmail 24533 invoked from network); 7 Oct 2010 20:56:34 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail3.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 7 Oct 2010 20:56:33 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 13BDA50837; Thu, 7 Oct 2010 16:56:33 -0400 (EDT) From: Lowell Gilbert To: Robert Huff References: <4CAE02AB.1090009@netmusician.org> <19630.10423.657252.744311@jerusalem.litteratus.org> Date: Thu, 07 Oct 2010 16:56:32 -0400 In-Reply-To: <19630.10423.657252.744311@jerusalem.litteratus.org> (Robert Huff's message of "Thu, 7 Oct 2010 16:08:23 -0400") Message-ID: <44hbgx3enz.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: 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:56:34 -0000 Robert Huff writes: > Joe Auty writes: > >> 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? > > My advice would be to not use syslog. It's bee a while since I > fixed this problen, but I remember reading Apache has ... issues > ... with rotating logs using syslog/newsyslog. Those problems were a race condition between (Apache) closing the log file and (newsyslog) opening it to start compression. *How* the log rotation is done isn't really relevant (unless one sends the logs through pipes), but the only safe way is to shut down the server while the rotation is being done. You don't compress your logs, so it wouldn't affect you anyway. Joe does, so it could be an issue for him; the Apache documentation covers a number of options.