Date: Thu, 07 Oct 2010 16:06:08 -0400 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Joe Auty <joe@netmusician.org> Cc: freebsd-questions@freebsd.org Subject: Re: newsyslog.conf and Apache log files Message-ID: <44lj693gzz.fsf@be-well.ilk.org> References: <4CAE02AB.1090009@netmusician.org> <4439sh507l.fsf@be-well.ilk.org> <4CAE200F.9070202@netmusician.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe Auty <joe@netmusician.org> writes: > Lowell Gilbert wrote: >> Joe Auty <joe@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. > > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44lj693gzz.fsf>