I rencently updated the config of my server to relocate the /var/www and /var/log in the /home folder, i also updated all my virtuals hosts to write the logs in the new /home/log folder.

But now the logs are written inside huge files, one for the error and one for the access and not in form of multiples archived files (like log.1.log, log.2.gz) like before.

How can i restore the log file splitting?


Since you have changed the location of the logs you should also update configs in logrotate cause it still looks for those logs in /var/log. I don't know what Linux distro you're using but they should be in /etc/logrotate.d/ directory

  • Thanks, do i need to restart the server after the update of the logrogate file? – DoesNotCompute Aug 27 '12 at 14:02
  • No : Have a look at your crontabs, that's where logrotate is usually triggered – user130370 Aug 27 '12 at 14:23

You need to change /etc/logrotate.d/apache2. See http://www.thegeekstuff.com/2010/07/logrotate-examples/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.