Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Oct 2010 16:56:32 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        Joe Auty <joe@netmusician.org>, freebsd-questions@freebsd.org
Subject:   Re: newsyslog.conf and Apache log files
Message-ID:  <44hbgx3enz.fsf@be-well.ilk.org>
In-Reply-To: <19630.10423.657252.744311@jerusalem.litteratus.org> (Robert Huff's message of "Thu, 7 Oct 2010 16:08:23 -0400")
References:  <4CAE02AB.1090009@netmusician.org> <19630.10423.657252.744311@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Huff <roberthuff@rcn.com> 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.  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44hbgx3enz.fsf>