Posts tagged as:

log files

Rotate Apache log files on Ubuntu Hardy Heron server

by JCSeptember 16, 2008 Settings

Ubuntu Hardy Heron Server comes pre-installed with a program called logrotate.d. Once you understand how this works log rotation for your Virtual Hosts is easy.
First, edit the log rotation parameters:
sudo nano /etc/logrotate.d/apache2
The standard contents of this file is:
/var/log/apache2/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f /var/run/apache2.pid ]; then
/etc/init.d/apache2 restart > /dev/null
fi
endscript
}
I simply copy and paste [...]

0 comments Read the full article →