Hi! Logrotate for Websites access.log works fine but error.log doesn't rotate. How to change this? Thank you! EDIT: Found the solution here: Upgrade to 3.0.3 Beta.
On my server the error.log gets rotated when it exceeds 10 MB in size. Maybe you have commented out the cron_daily.sh cronjob in the root crontab on your server?
Hi Till, the error.log is more than 60MB. I didn't comment anything out and the access.log rotation works fine...
I've just tested the rotation of the website error.log by creating a 11 MB error.log file and then running the cron_daily.sh script with the current SVN version and it worked on my test server.
With 3.0.3 RC it still don't work Here is my /usr/local/ispconfig/server/cron_daily.sh: Code: #!/bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin /usr/bin/php -q /usr/local/ispconfig/server/cron_daily.php So nothing is commented out. The error.log is in located at /var/www/clients/clientX/webY/log/error.log, like the access.log. For the access.log the rotation works fine, like I wrote. What am I doing wrong?
error.log You seem to be correct Andreas. /usr/local/ispconfig/server/cron_daily.php does not have anything in it for error.log. We had to add this in a cron job to handle error logging with one of our Heavy Duty sites. 00 09 * * 0 /bin/cat /dev/null > /var/www/HEAVY-DUTY-SITE/log/error.log The 400M error.log was killing the whole servers network connectivity And then the phones started ringing in the middle of the night. - Sam
Then you dont run ISPConfig 3.0.3. From cron_daily.php ispconfig 3.0.3 line 222: Code: // rotate and compress the error.log when it exceeds a size of 10 MB $logfile = escapeshellcmd($rec['document_root'].'/log/error.log'); if(is_file($logfile) && filesize($logfile) > 10000000) { exec("gzip -c $logfile > $logfile.1.gz"); exec("cat /dev/null > $logfile"); }