From owner-freebsd-questions@FreeBSD.ORG Thu Oct 7 20:08:27 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 081B6106566C for ; Thu, 7 Oct 2010 20:08:27 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id B7C358FC13 for ; Thu, 7 Oct 2010 20:08:26 +0000 (UTC) Received: from mr16.lnh.mail.rcn.net ([207.172.157.36]) by smtp02.lnh.mail.rcn.net with ESMTP; 07 Oct 2010 16:08:25 -0400 Received: from mx04.lnh.mail.rcn.net (mx04.lnh.mail.rcn.net [207.172.157.54]) by mr16.lnh.mail.rcn.net (MOS 4.1.9-GA) with ESMTP id AQQ23050; Thu, 7 Oct 2010 16:08:25 -0400 Received: from 209-6-91-204.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.91.204]) by smtp04.lnh.mail.rcn.net with ESMTP; 07 Oct 2010 16:08:24 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19630.10423.657252.744311@jerusalem.litteratus.org> Date: Thu, 7 Oct 2010 16:08:23 -0400 To: Joe Auty In-Reply-To: <4CAE02AB.1090009@netmusician.org> References: <4CAE02AB.1090009@netmusician.org> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr16.lnh.mail.rcn.net) Cc: freebsd-questions@freebsd.org Subject: 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:08:27 -0000 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. Instead I use sysutils/cronolog with: ErrorLog "|/usr/local/sbin/cronolog /var/log/httpd-errors.%Y-%m.log" TransferLog "|/usr/local/sbin/cronolog /var/log/httpd-access.%Y-%m.log" in httpd.conf. This gets me: -rw-r--r-- 1 root wheel 11504 Dec 28 2009 httpd-access.2009-12.log -rw-r--r-- 1 root wheel 6380 Feb 3 2010 httpd-access.2010-02.log -rw-r--r-- 1 root wheel 1390 Mar 11 2010 httpd-access.2010-03.log -rw-r--r-- 1 root wheel 1439 Apr 23 16:06 httpd-access.2010-04.log -rw-r--r-- 1 root wheel 904451 May 30 10:52 httpd-access.2010-05.log -rw-r--r-- 1 root wheel 20279 Jun 29 12:29 httpd-access.2010-06.log -rw-r--r-- 1 root wheel 1586153 Jul 28 07:50 httpd-access.2010-07.log -rw-r--r-- 1 root wheel 164305 Aug 31 18:51 httpd-access.2010-08.log -rw-r--r-- 1 root wheel 14294 Sep 9 08:19 httpd-access.2010-09.log -rw-r--r-- 1 root wheel 3093989 Sep 9 08:19 httpd-access.log -rw-r--r-- 1 root wheel 71655 Oct 7 2009 httpd-error.log -rw-rw-r-- 1 root wheel 3574 Oct 7 2009 httpd-errors.2009-10.log -rw-r--r-- 1 root wheel 1827 Nov 30 2009 httpd-errors.2009-11.log -rw-r--r-- 1 root wheel 1827 Jan 17 2010 httpd-errors.2010-01.log -rw-r--r-- 1 root wheel 5027 Feb 3 2010 httpd-errors.2010-02.log -rw-r--r-- 1 root wheel 10562 Mar 25 2010 httpd-errors.2010-03.log -rw-r--r-- 1 root wheel 5471 Apr 23 16:05 httpd-errors.2010-04.log -rw-r--r-- 1 root wheel 332035 May 30 10:52 httpd-errors.2010-05.log -rw-r--r-- 1 root wheel 10817 Jun 29 12:29 httpd-errors.2010-06.log -rw-r--r-- 1 root wheel 569109 Jul 28 07:50 httpd-errors.2010-07.log -rw-r--r-- 1 root wheel 59928 Aug 31 18:51 httpd-errors.2010-08.log -rw-r--r-- 1 root wheel 5198 Sep 9 08:19 httpd-errors.2010-09.log in /var/log. Robert Huff