Wrong symbolic link for vhost subdomains (yesterday-access.log)
Current setup:
domain: aaa.de logoutput to /var/log/ispconfig/httpd/aaa.de
On daily task ispconfig creates a correct symbolic link to /var/www/clients/clientx/weby/log/.log
subdomain: bbb.aaa.de, logoutput to /var/log/ispconfig/httpd/bbb.aaa.de which mounts to /var/www/clients/clientx/weby/log/bbb which is correct.
But on daily task the symbolic link yesterday-access.log points to /var/www/clients/clientx/weby/log/.log instead of /var/www/clients/clientx/weby/log/bbb/.log
Reason:
in daily_cron.php the variable $logfile don't respect the vhostsubdomain type and so does not integrate $rec['web_folder'] into path. I'd worked around with
$sub = ($rec['type'] == 'vhostsubdomain' ? $rec['web_folder'].'/' : '');
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$sub.$yesterday.'-access.log');
if(!@is_file($logfile)) {
$logfile = escapeshellcmd($rec['document_root'].'/log/'.$sub.$yesterday.'-access.log.gz');
if(!@is_file($logfile)) {
continue;
}
}
eg, integrate the web_folder into logfile path if current domain is a vhost subdomain.
May not the best way but I had no better idea 'cause I'm not a php expert at all.
Would be great if this gets fixed.