tbrehm
2011-09-23 d81a4c42e7ee990f8ad7099fd116bf634b27fdbf
- Fixed some awstats problems.
- Added SNI config field in sysetm > server config > web.
7 files modified
41 ■■■■ changed files
install/tpl/server.ini.master 1 ●●●● patch | view | raw | blame | history
interface/web/admin/form/server_config.tform.php 6 ●●●●● patch | view | raw | blame | history
interface/web/admin/lib/lang/en_server_config.lng 1 ●●●● patch | view | raw | blame | history
interface/web/admin/templates/server_config_web_edit.htm 6 ●●●●● patch | view | raw | blame | history
server/conf/awstats_index.php.master 22 ●●●● patch | view | raw | blame | history
server/cron_daily.php 2 ●●●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 3 ●●●●● patch | view | raw | blame | history
install/tpl/server.ini.master
@@ -61,6 +61,7 @@
php_ini_path_apache=/etc/php5/apache2/php.ini
php_ini_path_cgi=/etc/php5/cgi/php.ini
check_apache_config=y
enable_sni=y
nginx_cgi_socket=/var/run/fcgiwrap.socket
php_fpm_init_script=php5-fpm
php_fpm_ini_path=/etc/php5/fpm/php.ini
interface/web/admin/form/server_config.tform.php
@@ -438,6 +438,12 @@
            'default' => 'y',
            'value' => array(0 => 'n', 1 => 'y')
        ),
        'enable_sni' => array(
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
            'default' => 'y',
            'value' => array(0 => 'n', 1 => 'y')
        ),
        'user' => array(
            'datatype' => 'VARCHAR',
            'formtype' => 'TEXT',
interface/web/admin/lib/lang/en_server_config.lng
@@ -148,5 +148,6 @@
$wb["do_not_try_rescue_mysql_txt"] = 'Disable MySQL monitoring';
$wb["do_not_try_rescue_mail_txt"] = 'Disable Email monitoring';
$wb["rescue_description_txt"] = '<b>Information:</b> If you want to shut down mysql you have to select the "Disable MySQL monitor" checkbox and then wait 2-3 minutes.<br>if you do not wait 2-3 minutes, rescue will try to restart mysql!';
$wb["enable_sni_txt"] = 'Enable SNI';
?>
interface/web/admin/templates/server_config_web_edit.htm
@@ -70,6 +70,12 @@
                    </div>
            </div>
      <div class="ctrlHolder apache">
                <p class="label">{tmpl_var name='enable_sni_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='enable_sni'}
                    </div>
            </div>
      <div class="ctrlHolder apache">
          <label for="user">{tmpl_var name='web_user_txt'}</label>
        <input name="user" id="user" value="{tmpl_var name='user'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
server/conf/awstats_index.php.master
@@ -5,9 +5,10 @@
    iframe.src = url;
}
</script>
<?php
$aw['aw_jump_text'] = 'Jump to previous stats: ';
$aw['aw_renamed_index'] = 'awsindex.html';
$aw['aw_renamed_index'] = 'fixedindex.html';
if ($handle = opendir('.'))
{
@@ -19,22 +20,21 @@
                }
        }
        $month = date("m")+1-1;
        $month = date("n");
        $year = date("Y");
        if (date("d") == 1)
        {
                        $month = date("m")-1;
        }
        $year = date("Y");
        if (date("m") == 1)
        {
                        $year = date("Y")-1;
                        $month = "12";
                $awmonth = date("m")-1;
                if (date("m") == 1)
                {
                        $awyear = date("Y")-1;
                        $awmonth = "12";
                }
        }
        $awprev[] = $year."-".$month;
        closedir($handle);
}
server/cron_daily.php
@@ -132,6 +132,8 @@
    $webalizer = '/usr/bin/webalizer';
    $webalizer_conf_main = '/etc/webalizer/webalizer.conf';
    $webalizer_conf = escapeshellcmd($rec['document_root'].'/log/webalizer.conf');
    unlink($statsdir.'/index.php');
    if(!@is_file($webalizer_conf)) {
        copy($webalizer_conf_main,$webalizer_conf);
server/plugins-available/apache2_plugin.inc.php
@@ -1698,6 +1698,9 @@
            file_put_contents($awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf',$content);
            $app->log('Created AWStats config file: '.$awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf',LOGLEVEL_DEBUG);
        }
        unlink($data['new']['document_root']."/web/stats/index.html");
        copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$data['new']['document_root']."/web/stats/index.php");
    }
    
    //* Delete the awstats configuration file