The Geek Stuff shows you how to rotate Apache log files
Question: I would like to automatically rotate the apache access_log and error_log files. Can you explain with an example on how to do this? Answer: This can be achived using logrotate utility as explained below. Add the following file to /etc/logrotate.d directory. # vi /etc/logrotate.d/apache /usr/local/apache2/logs/access_log /usr/local/apache2/logs/error_log { size 100M compress dateext maxage 30 postrotate [...]How to Rotate Apache Log Files in Linux