Code:
nlandys@daffy# ls -alS /var/log | head
total 61420
-rw-r--r-- 1 root wheel 60976240 Dec 16 00:47 httpd-access.log
-rw-r--r-- 1 root wheel 988944 Dec 16 00:41 httpd-error.log
-rw-r--r-- 1 root wheel 96571 Dec 16 00:53 messages
-rw------- 1 root wheel 81286 Dec 16 00:50 cron
-rw------- 1 root wheel 80737 Dec 16 00:54 auth.log
-rw-r--r-- 1 root wheel 60544 Nov 1 00:20 wtmp.1
-rw-r--r-- 1 root wheel 55528 Sep 30 23:40 wtmp.2
-rw-r--r-- 1 root wheel 47432 Sep 1 01:27 wtmp.3
-rw-r--r-- 1 root wheel 46552 Nov 30 20:58 wtmp.0
What is an elegant way to not let the httpd logs get too large? These logs contain all hits since my server was started 6 months ago. Is there a preferred automated way to rotate logs and remove old ones?
Code:
nlandys@daffy# pkg_info -Qao | grep apache
apache-2.2.9_5:www/apache22
apache-ant-1.7.0_2:devel/apache-ant
nlandys@daffy# uname -a
FreeBSD daffy.nerius.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Fri Feb 29 18:56:41 PST 2008 root@daffy.nerius.com:/usr/obj/usr/src/sys/DAFFY i386