fix for awstats aliases if the customerdocroot is equal to the domaindocroot
This commit is contained in:
@@ -504,6 +504,15 @@ class apache
|
|||||||
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
$stats_text.= ' Alias /webalizer "' . makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if the docroots are equal, we still have to set an alias for awstats
|
||||||
|
// because the stats are in /awstats/[domain], not just /awstats/
|
||||||
|
// also, the awstats-icons are someplace else too!
|
||||||
|
// -> webalizer does not need this!
|
||||||
|
elseif($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$stats_text.= ' Alias /awstats "' . makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
|
||||||
|
$stats_text.= ' Alias /awstats-icon "' . makeCorrectDir($this->settings['system']['awstats_icons']) . '"' . "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stats_text;
|
return $stats_text;
|
||||||
|
|||||||
@@ -860,6 +860,15 @@ class lighttpd
|
|||||||
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer').'" )' . "\n";
|
$stats_text.= ' alias.url = ( "/webalizer/" => "'.makeCorrectFile($domain['customerroot'] . '/webalizer').'" )' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if the docroots are equal, we still have to set an alias for awstats
|
||||||
|
// because the stats are in /awstats/[domain], not just /awstats/
|
||||||
|
// also, the awstats-icons are someplace else too!
|
||||||
|
// -> webalizer does not need this!
|
||||||
|
elseif($this->settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$stats_text.= ' alias.url = ( "/awstats/" => "'.makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']).'" )' . "\n";
|
||||||
|
$stats_text.= ' alias.url = ( "/awstats-icon" => "' . makeCorrectDir($this->settings['system']['awstats_icons']) . '" )' . "\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stats_text;
|
return $stats_text;
|
||||||
|
|||||||
@@ -633,15 +633,19 @@ class nginx
|
|||||||
$stats_text.= "\t" . '}' . "\n";
|
$stats_text.= "\t" . '}' . "\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
}else
|
}
|
||||||
|
// if the docroots are equal, we still have to set an alias for awstats
|
||||||
|
// because the stats are in /awstats/[domain], not just /awstats/
|
||||||
|
// also, the awstats-icons are someplace else too!
|
||||||
|
// -> webalizer does not need this!
|
||||||
|
elseif($this->settings['system']['awstats_enabled'] == '1')
|
||||||
{
|
{
|
||||||
//link the awstats icons for use in the static pages.
|
$stats_text.= "\t" . 'location /awstats {' . "\n";
|
||||||
if($this->settings['system']['awstats_enabled'] == '1')
|
$stats_text.= "\t\t" . 'alias ' . makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . ';' . "\n";
|
||||||
{
|
$stats_text.= "\t" . '}' . "\n";
|
||||||
$stats_text.= "\t" . 'location /awstats-icon {' . "\n";
|
$stats_text.= "\t" . 'location /awstats-icon {' . "\n";
|
||||||
$stats_text.= "\t\t" . 'alias ' . makeCorrectDir($this->settings['system']['awstats_icons']) . ';' . "\n";
|
$stats_text.= "\t\t" . 'alias ' . makeCorrectDir($this->settings['system']['awstats_icons']) . ';' . "\n";
|
||||||
$stats_text.= "\t\t" . '}' . "\n";
|
$stats_text.= "\t\t" . '}' . "\n";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user