Google Translate

Stella inattivaStella inattivaStella inattivaStella inattivaStella inattiva
 

On my server Ubuntu 10.04 with ispconfig 3.x, the rotation log file didn't work. Search, search, search on internet but nothing helped me.

After investigating I found the solution, so let me share it with the internet community.

ISP Config 3 has a cron daily job active for that.

crontab -l

* * * * * /usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
30 00 * * * /usr/local/ispconfig/server/cron_daily.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done

Cron_daily.sh run a  the php cron_daily.php.

The script search the log file in the client web folder, for ie example /var/www/clients/client6/web12/log/error.log. This folder is empty!

Logs are stored in /var/log/ispconfig/httpd/mydomain.com for example /var/log/ispconfig/httpd/byman.it

So to fix the problem I deleted the client log folder and created a symbolic link. Of course you need a root access.

rm /var/www/byman.it/log -r
ln /var/log/ispconfig/httpd/byman.it/ /var/www/byman.it/log -s

byman.it -> /var/www/clients/client6/web12 is a symbolic file. I used it that because it's easier remeber the domain instead of the clientx webxx.

You fixed 2 problem:

  1. Log File Rotation and Compressing
  2. Log accessible from Client FTP. Your clients can open the log file under /web/logs folder.

 I hope this fix will help someone to save time.

- have fun -