Commit d81a4c42 authored by tbrehm's avatar tbrehm

- Fixed some awstats problems.

- Added SNI config field in sysetm > server config > web.
parent 533de42a
......@@ -61,6 +61,7 @@ awstats_buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages.pl
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
......
......@@ -438,6 +438,12 @@ $form["tabs"]['web'] = array(
'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',
......
......@@ -148,5 +148,6 @@ $wb["do_not_try_rescue_apache_txt"] = 'Disable apache monitoring';
$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';
?>
\ No newline at end of file
......@@ -69,6 +69,12 @@
{tmpl_var name='check_apache_config'}
</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" />
......
......@@ -5,9 +5,10 @@ function load_content(url)
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 @@ if ($handle = opendir('.'))
}
}
$month = date("m")+1-1;
if (date("d") == 1)
{
$month = date("m")-1;
}
$month = date("n");
$year = date("Y");
if (date("m") == 1)
if (date("d") == 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);
}
......
......@@ -132,6 +132,8 @@ foreach($records as $rec) {
$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);
......
......@@ -1698,6 +1698,9 @@ class apache2_plugin {
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
......
Markdown is supported
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