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.

UPDATED ON Aug 23, 2022 - see tag #permission

 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/ 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
30 00 * * * /usr/local/ispconfig/server/ 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done run a  the php cron_daily.php.

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

Logs are stored in /var/log/ispconfig/httpd/ for example /var/log/ispconfig/httpd/

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

 2022-08-23 I got the same issue of log rotation and I got trouble to remove log folder: Operation not permitted. I find the solution on How To Force Forum, thx to Till

The web directories are protected!
   lsattr /var/www/clients/client1/
- CHANGE : remove protection attribute
  chattr -i /var/www/clients/client1/web1
  rm /var/www/clients/client1/web1/log -r
   ln /var/log/ispconfig/httpd/ /var/www/ -s
- CHANGE: add protection attribute
  chattr +i /var/www/clients/client1/web1 -> /var/www/clients/client1/web1 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 -



DISQUS - Leave your comments here