Re: Apache log rotation

From: Robert Fitzpatrick <robert_at_webtent.org>
Date: Mon, 17 Jul 2023 16:01:56 UTC
> Morgan Wesström <mailto:freebsd-database@pp.dyndns.biz>
> Monday, July 17, 2023 8:19 AM
>
>
> I don't have an answer for your specific problem but just wanted to 
> suggest an alternative solution. Have you looked at sysutils/cronolog? 
> Instead of relying on logrotate and restarting the apache process you 
> simply pipe the logs to cronolog which splits them according to a 
> pattern you define. Apache will run uninterrupted and logrotate won't 
> be used at all.
>
> Snippets from my own conf files that splits the logfiles per 
> year-month (note the pipe sign):
>
> ErrorLog "|/usr/local/sbin/cronolog 
> /var/log/apache24/httpd-error.%Y%m.default.log"
> CustomLog "|/usr/local/sbin/cronolog 
> /var/log/apache24/httpd-access.%Y%m.default.log" combinedio
Thanks, could be very helpful.