diff --git a/install/tpl/apache_ispconfig.conf.master b/install/tpl/apache_ispconfig.conf.master index b1de2a167621b5ff3fa242e33f64be14ef3065a3..2a7ac0662e9f9cbc427330016bd903b979550dc7 100644 --- a/install/tpl/apache_ispconfig.conf.master +++ b/install/tpl/apache_ispconfig.conf.master @@ -3,6 +3,7 @@ ################################################ ServerTokens ProductOnly ServerSignature Off +DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html ################################################ # ISPConfig Logfile configuration for vlogger diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index f2b3e0f8338fc5d520dd5ce975e32d4131bfec9c..a3b14a58fa694ed4fb1ff5a06e1df0086ed3ab09 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -79,7 +79,7 @@ server { </tmpl_if> </tmpl_loop> <tmpl_if name='use_proxy' op='!=' value='y'> - index index.html index.htm index.php index.cgi index.pl index.xhtml; + index index.html index.htm index.php index.cgi index.pl index.xhtml standard_index.html; <tmpl_if name='ssi' op='==' value='y'> location ~ \.shtml$ { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 26cd14fd3629e2b7c7aec70d6ef550ad2fc1ffe8..45594da5f115151679d9c704072d947b863024f1 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -953,11 +953,11 @@ class apache2_plugin { $app->system->exec_safe('chmod -R a+r ?', $error_page_path); } - //* Copy the web skeleton files only when there is no index.ph or index.html file yet - if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) { + //* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet + if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/standard_index.html')) { if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) { - if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/index.html')) { - $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/index.html'); + if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) { + $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/standard_index.html'); } if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) { @@ -968,13 +968,13 @@ class apache2_plugin { } } else { if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) { - if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/index.html'); + if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/standard_index.html'); } else { - if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html'); - if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){ + if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/standard_index.html'); + if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) { if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/'); } - if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){ + if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) { if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/robots.txt')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/robots.txt', $data['new']['document_root'].'/' . $web_folder . '/'); } } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 73e788ed436d2c50cc8be7a7f0122b80793571e7..62a618ce7fae7d23be5ef921e3064e00878a50ac 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -791,10 +791,12 @@ class nginx_plugin { $app->system->exec_safe('chmod -R a+r ?', $error_page_path); } - //* Copy the web skeleton files only when there is no index.ph or index.html file yet - if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) { + //* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet + if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/standard_index.html')) { if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) { - if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html'); + if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) { + $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html_' . substr($conf['language'], 0, 2), $data['new']['document_root'] . '/' . $web_folder . '/standard_index.html'); + } if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) { if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/'); @@ -804,13 +806,13 @@ class nginx_plugin { } } else { if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) { - if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/index.html'); + if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf-custom/index/standard_index.html', $data['new']['document_root'].'/' . $web_folder . '/standard_index.html'); } else { - if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/index.html'); - if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){ + if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/standard_index.html')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/standard_index.html_'.substr($conf['language'], 0, 2), $data['new']['document_root'].'/' . $web_folder . '/standard_index.html'); + if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) { if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/favicon.ico')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/favicon.ico', $data['new']['document_root'].'/' . $web_folder . '/'); } - if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){ + if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) { if(!file_exists($data['new']['document_root'].'/' . $web_folder . '/robots.txt')) $app->system->exec_safe('cp ? ?', $conf['rootpath'] . '/conf/index/robots.txt', $data['new']['document_root'].'/' . $web_folder . '/'); } }