This is my first question. I don't know how to config error.log has 2 function as below:
yesterday is 11/22/2013, so the error log of yesterday is named 11_22_2013.error.log
You can make use of the rotatelogs command to log rotate the apache logs. Try to put the following as a crontab.
Add the following there.
/usr/local/apache/bin/rotatelogs /path_to_apachelogs.%Y.%m.%d 86400
/usr/local/apache/bin/rotatelogs This path is meant for a cPanel server. You needed to give the full path for it to work. You can use the following command for getting the path.
If this is not showing any outputs, Try to locate the path with the locate command.
You can have further awareness from the following link