Skip to content

Newsyslog on FreeBSD

To process files matching a pattern, specify the G option in /etc/newsyslog.conf:

#--- EXIM
/var/log/exim/*.log     mailnull:mail   640     9       *       $W6D0   JG      /var/run/exim.pid
cat /usr/local/etc/newsyslog.conf.d/nginx
#--- 
/var/log/nginx/*.log    644 9 * $W6D0  GZ /var/run/nginx.pid 30
cat /usr/local/etc/newsyslog.conf.d/apache
#
/var/log/httpd-access.log 600 6 * @T00  B /var/run/httpd.pid 30
/var/log/httpd-error.log  600 6 * @T00  B /var/run/httpd.pid 30
#
/var/log/httpd/*.log    644 9 * $W6D0  GZ /var/run/httpd.pid 30
#

Run manually using the current /etc/newsyslog.conf:

newsyslog -F