Commit 1abf85b4 authored by tbrehm's avatar tbrehm

Fixed a bug in awstats alias domains.

parent 91aaafb0
......@@ -180,7 +180,7 @@ foreach($records as $rec) {
if(is_file($awstats_website_conf_file)) unlink($awstats_website_conf_file);
$sql = "SELECT domain FROM web_domain WHERE (type = 'alias' OR type = 'subdomain') AND server_id = ".$conf['server_id'];
$sql = "SELECT domain FROM web_domain WHERE (type = 'alias' OR type = 'subdomain') AND parent_domain_id = ".$rec['domain_id'];
$aliases = $app->db->queryAllRecords($sql);
$aliasdomain = '';
......@@ -194,7 +194,7 @@ foreach($records as $rec) {
$awstats_conf_file_content = 'Include "'.$awstats_conf_dir.'/awstats.conf"
LogFile="/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log"
SiteDomain="'.$domain.'"
HostAliases="www.'.$domain.' localhost 127.0.0.1"'.$aliasdomain;
HostAliases="www.'.$domain.' localhost 127.0.0.1'.$aliasdomain.'"';
file_put_contents($awstats_website_conf_file,$awstats_conf_file_content);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment