Commit e6abfe7c authored by Carsten's avatar Carsten
Browse files

fallback to awstats.model.conf if awstats.conf does not exist

parent a1759278
......@@ -100,7 +100,12 @@ class cronjob_awstats extends cronjob {
}
if(!is_file($awstats_website_conf_file)) {
$awstats_conf_file_content = 'Include "'.$awstats_conf_dir.'/awstats.conf"
if (is_file($awstats_conf_dir."/awstats.conf")) {
$include_file = $awstats_conf_dir."/awstats.conf";
} elseif (is_file($awstats_conf_dir."/awstats.model.conf")) {
$include_file = $awstats_conf_dir."/awstats.model.conf";
}
$awstats_conf_file_content = 'Include "'.$include_file.'"
LogFile="/var/log/ispconfig/httpd/'.$domain.'/yesterday-access.log"
SiteDomain="'.$domain.'"
HostAliases="www.'.$domain.' localhost 127.0.0.1'.$aliasdomain.'"';
......
......@@ -2626,7 +2626,12 @@ class apache2_plugin {
}
$content = '';
$content .= "Include \"".$awstats_conf_dir."/awstats.conf\"\n";
if (is_file($awstats_conf_dir."/awstats.conf")) {
$include_file = $awstats_conf_dir."/awstats.conf";
} elseif (is_file($awstats_conf_dir."/awstats.model.conf")) {
$include_file = $awstats_conf_dir."/awstats.model.conf";
}
$content .= "Include \"".$include_file\"\n";
$content .= "LogFile=\"/var/log/ispconfig/httpd/".$data['new']['domain']."/access.log\"\n";
$content .= "SiteDomain=\"".$data['new']['domain']."\"\n";
$content .= "HostAliases=\"www.".$data['new']['domain']." localhost 127.0.0.1\"\n";
......
......@@ -2236,7 +2236,12 @@ class nginx_plugin {
}
$content = '';
$content .= "Include \"".$awstats_conf_dir."/awstats.conf\"\n";
if (is_file($awstats_conf_dir."/awstats.conf")) {
$include_file = $awstats_conf_dir."/awstats.conf";
} elseif (is_file($awstats_conf_dir."/awstats.model.conf")) {
$include_file = $awstats_conf_dir."/awstats.model.conf";
}
$content .= "Include \"".$include_file\"\n";
$content .= "LogFile=\"/var/log/ispconfig/httpd/".$data['new']['domain']."/access.log\"\n";
$content .= "SiteDomain=\"".$data['new']['domain']."\"\n";
$content .= "HostAliases=\"www.".$data['new']['domain']." localhost 127.0.0.1\"\n";
......
Supports Markdown
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