Date: Sat, 2 Jan 2021 21:38:48 +0100 From: Polytropon <freebsd@edvax.de> To: freebsd@dreamchaser.org Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: rotate apache logs? Message-ID: <20210102213848.a90879bd.freebsd@edvax.de> In-Reply-To: <25261693-8d86-9c6f-eb87-c82da4fcc559@dreamchaser.org> References: <25261693-8d86-9c6f-eb87-c82da4fcc559@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2 Jan 2021 13:12:56 -0700, Gary Aitken wrote: > It I look at /var/log, many of the logs are rotated. > However, apache logs are not, and I don't see a way in the apache config file > /usr/local/etc/apache24/httpd.conf to do this. > > Do each of the programs that rotate their logs have their own mechanism for > doing this, or is there a common mechanism that is used? I see that the > sysutils/logrotate port is available to do this, but not installed. It seems > strange that so many programs would rotate but not use a common utility for > that purpose. You can use the newsyslog facility provided by the FreeBSD OS. See /etc/newsyslog.conf and "man 5 newsyslog.conf" for details. It's possible to add configuration files for user-installed programs in /usr/local/etc/newsyslog.conf.d/ instead of adding the settings to the global configuration file. Also see "man 8 newsyslog" and /etc/crontab for further details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210102213848.a90879bd.freebsd>