Monday, June 20, 2011

Freebsd apache rotation log / change directory

Freebsd apache rotation log / change directory

add this line at ee /etc/newsyslog.conf

# Rotating Apache log ~ Dipetik dari : http://mikkel.hoegh.org/blog/2009/oct/8/rotating-apache-httpd-logfiles-freebsd

#/var/log/httpd-access.log www:www 440 9 * $W1D4 J /var/run/httpd.pid 30
/data/log/httpd-access.log www:www 440 9 * $D11 J /var/run/httpd.pid 30
/var/log/httpd-error.log www:www 440 9 * $W1D4 J /var/run/httpd.pid 30


after adding at httpd.conf

search http-access.log

CustomLog "/data/log/httpd-access.log" combined


and adding / replace at vhost.conf (if you using vhost)

CustomLog "/data/log/httpd-access.log" common

Restart Apache

No comments:

Post a Comment