Re: Apache log rotation

From: Morgan_Wesström <freebsd-database_at_pp.dyndns.biz>
Date: Mon, 17 Jul 2023 12:19:12 UTC
On 2023-07-16 21:07, Robert Fitzpatrick wrote:
> Ever since I upgraded from FreeBSD 13.1 to 13.2, each week when the logrotate 
> happens for my Apache logs, apache dies. I see this in the log...
> 

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

Regards
Morgan