/etc/logrotate.d/apache2
/var/log/apache2/hosts.log /var/log/apache2/hosts_error.log {
monthly
missingok
rotate 12
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2/apache2.pid}`" ]; then
/etc/init.d/apache2 restart
fi
endscript
}