newsyslog.conf and Apache log files
David Brodbeck
gull at gull.us
Thu Oct 7 20:48:19 UTC 2010
On Thu, Oct 7, 2010 at 11:25 AM, Lowell Gilbert
<freebsd-questions-local at be-well.ilk.org> wrote:
> Joe Auty <joe at netmusician.org> 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.
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.
More information about the freebsd-questions
mailing list