VirtualHostLogRotation
Add to /etc/logrotate.d/apache2
/home/*/*/logs/access.log {
su root adm
monthly
rotate 12
sharedscripts
nocompress
postrotate
if [ -f /var/run/apache2.pid ]; then \
if [ -x /usr/sbin/invoke-rc.d ]; then \
invoke-rc.d apache2 reload > /dev/null; \
else \
/etc/init.d/apache2 reload > /dev/null; \
fi; \
fi;
endscript
}
/home/*/*/logs/error.log {
su root adm
monthly
rotate 12
sharedscripts
compress
postrotate
if [ -f /var/run/apache2.pid ]; then \
if [ -x /usr/sbin/invoke-rc.d ]; then \
invoke-rc.d apache2 reload > /dev/null; \
else \
/etc/init.d/apache2 reload > /dev/null; \
fi; \
fi;
endscript
}
