Who can remember how to do all these things and why should we bother when nice people build CSS generators? Here are some favorites:
Apache doesn’t support log rotation but you can use a program called cronolog to handle it for you. Install and configuration only takes a minute.
CustomLog “|/usr/bin/cronolog /path/to/example-site/logs/%Y_%m_%d.log” combined
ErrorLog “|/usr/bin/cronolog /path/to/example-site/logs/%Y_%m_%d.err”
You’ll need to restart Apache by doing sudo service apache2 restart.
The %Y, %m and %d are arguments that Cronolog will use to rotate your logs and they mean year, month and day respectively. In this scenario Cronolog will rotate the log every day and create files like 2012_06_10.log, 2012_06_11.log, etc.