apache log files rotation
Uwe Doering
gemini at geminix.org
Fri Mar 5 06:35:50 PST 2004
Dave McCammon wrote:
> --- fbsd_user <fbsd_user at a1poweruser.com> wrote:
>>Can apache logs be rotated by /etc/newsyslog.conf?
>>If not, how is it normally done?
>>
>>_______________________________________________
>
> Here is the relevent portion of my newsyslog.conf
>
> /var/log/httpd-access.log 640 14 * $D0 Z
> /var/run/httpd.pid
> /var/log/httpd-error.log 640 14 * $D0 Z
> /var/run/httpd.pid
>
> "man newsyslog" for more info on the fields.
Just a hint in case you plan on running a web statistics program over
the access log: add 'B' to the flags column for 'httpd-access.log',
resulting in 'BZ'. This will omit the 'logfile turned over due to ...'
lines generated by 'newsyslog', which the statistics program may
otherwise complain about.
Uwe
--
Uwe Doering | EscapeBox - Managed On-Demand UNIX Servers
gemini at geminix.org | http://www.escapebox.net
More information about the freebsd-questions
mailing list