I've Ubuntu 10.04.1 running Light. I've logging setup for Apache, together with log rotation.

When Apache begins, it logs everything (access, error, other_vhosts_access, and ssl_access) properly. However, once the logs are rotated, it stops logging.

I've no clue what to do came from here. Help!

# logrotate.conf (removing comments):
daily
rotate 4
compress
compresscmd /bin/bzip2
compressext .bz2
include /etc/logrotate.d
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}
/var/log/btmp {
    missingok
    monthly
    create 0660 root utmp
    rotate 1
}

##logrotate.d/apache2 (removing comments):
/var/log/apache2/*.log {
dateext
create 640 root adm
sharedscripts
daily
compress
compresscmd /bin/bzip2
compressoptions -k
postrotate
    echo "-- `date` --" >> move_log.txt
    mv <path>/access.log-*.bz2 <path>
    mv <path>/ssl_access.log-*.bz2 <path>
endscript
}

You need to restart Apache after moving its log files away. That'll pressure it to shut the filehandles it had around the old log files, and open new handles (and make NEW log files). An easy service apache reload must do it (which essentially boils lower to some kill -HUP).

To become safe and sound, you need to slowly move the log files, THEN restart apache, THEN compress that old ones. This can prevent Apache from appending towards the old log files while you are publish-processing them.