rotate apache logs?

Polytropon freebsd at edvax.de
Sat Jan 2 20:39:02 UTC 2021


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, ...


More information about the freebsd-questions mailing list