Skip to content
Snippets Groups Projects
Commit d81a4c42 authored by tbrehm's avatar tbrehm
Browse files

- Fixed some awstats problems.

- Added SNI config field in sysetm > server config > web.
parent 533de42a
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ awstats_buildstaticpages_pl=/usr/share/awstats/tools/awstats_buildstaticpages.pl ...@@ -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_apache=/etc/php5/apache2/php.ini
php_ini_path_cgi=/etc/php5/cgi/php.ini php_ini_path_cgi=/etc/php5/cgi/php.ini
check_apache_config=y check_apache_config=y
enable_sni=y
nginx_cgi_socket=/var/run/fcgiwrap.socket nginx_cgi_socket=/var/run/fcgiwrap.socket
php_fpm_init_script=php5-fpm php_fpm_init_script=php5-fpm
php_fpm_ini_path=/etc/php5/fpm/php.ini php_fpm_ini_path=/etc/php5/fpm/php.ini
......
...@@ -438,6 +438,12 @@ $form["tabs"]['web'] = array( ...@@ -438,6 +438,12 @@ $form["tabs"]['web'] = array(
'default' => 'y', 'default' => 'y',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
), ),
'enable_sni' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'user' => array( 'user' => array(
'datatype' => 'VARCHAR', 'datatype' => 'VARCHAR',
'formtype' => 'TEXT', 'formtype' => 'TEXT',
......
...@@ -148,5 +148,6 @@ $wb["do_not_try_rescue_apache_txt"] = 'Disable apache monitoring'; ...@@ -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_mysql_txt"] = 'Disable MySQL monitoring';
$wb["do_not_try_rescue_mail_txt"] = 'Disable Email 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["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 @@ ...@@ -69,6 +69,12 @@
{tmpl_var name='check_apache_config'} {tmpl_var name='check_apache_config'}
</div> </div>
</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"> <div class="ctrlHolder apache">
<label for="user">{tmpl_var name='web_user_txt'}</label> <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" /> <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) ...@@ -5,9 +5,10 @@ function load_content(url)
iframe.src = url; iframe.src = url;
} }
</script> </script>
<?php <?php
$aw['aw_jump_text'] = 'Jump to previous stats: '; $aw['aw_jump_text'] = 'Jump to previous stats: ';
$aw['aw_renamed_index'] = 'awsindex.html'; $aw['aw_renamed_index'] = 'fixedindex.html';
if ($handle = opendir('.')) if ($handle = opendir('.'))
{ {
...@@ -19,22 +20,21 @@ if ($handle = opendir('.')) ...@@ -19,22 +20,21 @@ if ($handle = opendir('.'))
} }
} }
$month = date("m")+1-1; $month = date("n");
if (date("d") == 1)
{
$month = date("m")-1;
}
$year = date("Y"); $year = date("Y");
if (date("m") == 1) if (date("d") == 1)
{ {
$year = date("Y")-1; $awmonth = date("m")-1;
$month = "12"; if (date("m") == 1)
{
$awyear = date("Y")-1;
$awmonth = "12";
}
} }
$awprev[] = $year."-".$month; $awprev[] = $year."-".$month;
closedir($handle); closedir($handle);
} }
......
...@@ -132,6 +132,8 @@ foreach($records as $rec) { ...@@ -132,6 +132,8 @@ foreach($records as $rec) {
$webalizer = '/usr/bin/webalizer'; $webalizer = '/usr/bin/webalizer';
$webalizer_conf_main = '/etc/webalizer/webalizer.conf'; $webalizer_conf_main = '/etc/webalizer/webalizer.conf';
$webalizer_conf = escapeshellcmd($rec['document_root'].'/log/webalizer.conf'); $webalizer_conf = escapeshellcmd($rec['document_root'].'/log/webalizer.conf');
unlink($statsdir.'/index.php');
if(!@is_file($webalizer_conf)) { if(!@is_file($webalizer_conf)) {
copy($webalizer_conf_main,$webalizer_conf); copy($webalizer_conf_main,$webalizer_conf);
......
...@@ -1698,6 +1698,9 @@ class apache2_plugin { ...@@ -1698,6 +1698,9 @@ class apache2_plugin {
file_put_contents($awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf',$content); 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); $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 //* Delete the awstats configuration file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment