Apache’s access_log file rotates out into an archived copy around 1GB every few days. Where are the settings to control this? I’d like to be able to control both the max size and the number of archived logs it keeps around. Is this part of apache’s configuration, or do I need to write cron jobs ( et al ) to deal with this? I’m running pre-forked httpd.
Apache’s access_log file rotates out into an archived copy around 1GB every few days.
Share
On most Linux distributions, the system is set up to run logrotate on a daily basis. You won’t see it in the crontab for root or for any particular user.
It’s easy to change how it handles log files. On my Ubuntu server, the
/etc/logrotate.conffile has settings like these:[etc.]
And, you can look in the directory
/etc/logrotate.d/to see settings for specific directories and apps.