Skip to content

Commit d81a4c4

Browse files
committed
- Fixed some awstats problems.
- Added SNI config field in sysetm > server config > web.
1 parent 533de42 commit d81a4c4

File tree

7 files changed

+30
-11
lines changed

7 files changed

+30
-11
lines changed

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ awstats_buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages.pl
6161
php_ini_path_apache=/etc/php5/apache2/php.ini
6262
php_ini_path_cgi=/etc/php5/cgi/php.ini
6363
check_apache_config=y
64+
enable_sni=y
6465
nginx_cgi_socket=/var/run/fcgiwrap.socket
6566
php_fpm_init_script=php5-fpm
6667
php_fpm_ini_path=/etc/php5/fpm/php.ini

interface/web/admin/form/server_config.tform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@
438438
'default' => 'y',
439439
'value' => array(0 => 'n', 1 => 'y')
440440
),
441+
'enable_sni' => array(
442+
'datatype' => 'VARCHAR',
443+
'formtype' => 'CHECKBOX',
444+
'default' => 'y',
445+
'value' => array(0 => 'n', 1 => 'y')
446+
),
441447
'user' => array(
442448
'datatype' => 'VARCHAR',
443449
'formtype' => 'TEXT',

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,6 @@ $wb["do_not_try_rescue_apache_txt"] = 'Disable apache monitoring';
148148
$wb["do_not_try_rescue_mysql_txt"] = 'Disable MySQL monitoring';
149149
$wb["do_not_try_rescue_mail_txt"] = 'Disable Email monitoring';
150150
$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!';
151+
$wb["enable_sni_txt"] = 'Enable SNI';
151152

152153
?>

interface/web/admin/templates/server_config_web_edit.htm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ <h2><tmpl_var name="list_head_txt"></h2>
6969
{tmpl_var name='check_apache_config'}
7070
</div>
7171
</div>
72+
<div class="ctrlHolder apache">
73+
<p class="label">{tmpl_var name='enable_sni_txt'}</p>
74+
<div class="multiField">
75+
{tmpl_var name='enable_sni'}
76+
</div>
77+
</div>
7278
<div class="ctrlHolder apache">
7379
<label for="user">{tmpl_var name='web_user_txt'}</label>
7480
<input name="user" id="user" value="{tmpl_var name='user'}" size="40" maxlength="255" type="text" class="textInput" />

server/conf/awstats_index.php.master

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ function load_content(url)
55
iframe.src = url;
66
}
77
</script>
8+
89
<?php
910
$aw['aw_jump_text'] = 'Jump to previous stats: ';
10-
$aw['aw_renamed_index'] = 'awsindex.html';
11+
$aw['aw_renamed_index'] = 'fixedindex.html';
1112

1213
if ($handle = opendir('.'))
1314
{
@@ -19,22 +20,21 @@ if ($handle = opendir('.'))
1920
}
2021
}
2122

22-
$month = date("m")+1-1;
23-
24-
if (date("d") == 1)
25-
{
26-
$month = date("m")-1;
27-
}
28-
23+
$month = date("n");
2924
$year = date("Y");
3025

31-
if (date("m") == 1)
26+
if (date("d") == 1)
3227
{
33-
$year = date("Y")-1;
34-
$month = "12";
28+
$awmonth = date("m")-1;
29+
if (date("m") == 1)
30+
{
31+
$awyear = date("Y")-1;
32+
$awmonth = "12";
33+
}
3534
}
3635

3736
$awprev[] = $year."-".$month;
37+
3838
closedir($handle);
3939
}
4040

server/cron_daily.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ function setConfigVar( $filename, $varName, $varValue ) {
132132
$webalizer = '/usr/bin/webalizer';
133133
$webalizer_conf_main = '/etc/webalizer/webalizer.conf';
134134
$webalizer_conf = escapeshellcmd($rec['document_root'].'/log/webalizer.conf');
135+
136+
unlink($statsdir.'/index.php');
135137

136138
if(!@is_file($webalizer_conf)) {
137139
copy($webalizer_conf_main,$webalizer_conf);

server/plugins-available/apache2_plugin.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,9 @@ private function awstats_update ($data,$web_config) {
16981698
file_put_contents($awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf',$content);
16991699
$app->log('Created AWStats config file: '.$awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf',LOGLEVEL_DEBUG);
17001700
}
1701+
1702+
unlink($data['new']['document_root']."/web/stats/index.html");
1703+
copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$data['new']['document_root']."/web/stats/index.php");
17011704
}
17021705

17031706
//* Delete the awstats configuration file

0 commit comments

Comments
 (0)