Carsten Schoene
2014-01-04 e6abfe7cab6d4465d5b2a68854a8a4dd30c49d0a
fallback to awstats.model.conf if awstats.conf does not exist
3 files modified
21 ■■■■ changed files
server/lib/classes/cron.d/150-awstats.inc.php 7 ●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 7 ●●●● patch | view | raw | blame | history
server/plugins-available/nginx_plugin.inc.php 7 ●●●● patch | view | raw | blame | history
server/lib/classes/cron.d/150-awstats.inc.php
@@ -100,7 +100,12 @@
            }
            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.'"';
server/plugins-available/apache2_plugin.inc.php
@@ -2626,7 +2626,12 @@
            }
            $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";
server/plugins-available/nginx_plugin.inc.php
@@ -2236,7 +2236,12 @@
            }
            $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";