fix awstats path in generated vhost config if speciallogfile=0

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-01-29 15:58:49 +01:00
parent c5bece64ce
commit e0f7fcd2ef
3 changed files with 12 additions and 0 deletions

View File

@@ -1034,6 +1034,10 @@ class Apache extends HttpConfigBase
$statTool = Settings::Get('system.traffictool');
$statDomain = "";
if ($statTool == 'awstats') {
// awstats generates for each domain regardless of speciallogfile
$statDomain = "/" . $domain['domain'];
}
if ($domain['speciallogfile'] == '1') {
$statDomain = "/" . (($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain']);
}

View File

@@ -719,6 +719,10 @@ class Lighttpd extends HttpConfigBase
$statTool = Settings::Get('system.traffictool');
$statDomain = "";
if ($statTool == 'awstats') {
// awstats generates for each domain regardless of speciallogfile
$statDomain = "/" . $domain['domain'];
}
if ($domain['speciallogfile'] == '1') {
$statDomain = "/" . (($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain']);
}

View File

@@ -1120,6 +1120,10 @@ class Nginx extends HttpConfigBase
$statTool = Settings::Get('system.traffictool');
$statDomain = "";
if ($statTool == 'awstats') {
// awstats generates for each domain regardless of speciallogfile
$statDomain = "/" . $domain['domain'];
}
if ($domain['speciallogfile'] == '1') {
$statDomain = "/" . (($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain']);
}