Skip to content

Commit 194edf9

Browse files
committed
Use standard_index.html as filename for the template index file (#5897)
1 parent 1107171 commit 194edf9

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

install/tpl/apache_ispconfig.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
################################################
44
ServerTokens ProductOnly
55
ServerSignature Off
6+
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm standard_index.html
67

78
################################################
89
# ISPConfig Logfile configuration for vlogger

server/conf/nginx_vhost.conf.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ server {
7979
</tmpl_if>
8080
</tmpl_loop>
8181
<tmpl_if name='use_proxy' op='!=' value='y'>
82-
index index.html index.htm index.php index.cgi index.pl index.xhtml;
82+
index index.html index.htm index.php index.cgi index.pl index.xhtml standard_index.html;
8383

8484
<tmpl_if name='ssi' op='==' value='y'>
8585
location ~ \.shtml$ {

server/plugins-available/apache2_plugin.inc.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -953,11 +953,11 @@ function update($event_name, $data) {
953953
$app->system->exec_safe('chmod -R a+r ?', $error_page_path);
954954
}
955955

956-
//* Copy the web skeleton files only when there is no index.ph or index.html file yet
957-
if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) {
956+
//* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet
957+
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')) {
958958
if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) {
959-
if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/index.html')) {
960-
$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');
959+
if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) {
960+
$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');
961961
}
962962

963963
if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) {
@@ -968,13 +968,13 @@ function update($event_name, $data) {
968968
}
969969
} else {
970970
if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) {
971-
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');
971+
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');
972972
} else {
973-
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');
974-
if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){
973+
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');
974+
if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) {
975975
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 . '/');
976976
}
977-
if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){
977+
if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) {
978978
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 . '/');
979979
}
980980
}

server/plugins-available/nginx_plugin.inc.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,12 @@ function update($event_name, $data) {
791791
$app->system->exec_safe('chmod -R a+r ?', $error_page_path);
792792
}
793793

794-
//* Copy the web skeleton files only when there is no index.ph or index.html file yet
795-
if(!file_exists($data['new']['document_root'].'/'.$web_folder.'/index.html') && !file_exists($data['new']['document_root'].'/'.$web_folder.'/index.php')) {
794+
//* Copy the web skeleton files only when there is no index.php, standard_index.html or index.html file yet
795+
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')) {
796796
if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html_'.substr($conf['language'], 0, 2))) {
797-
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');
797+
if(!file_exists($data['new']['document_root'] . '/' . $web_folder . '/standard_index.html')) {
798+
$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');
799+
}
798800

799801
if(is_file($conf['rootpath'] . '/conf-custom/index/favicon.ico')) {
800802
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 @@ function update($event_name, $data) {
804806
}
805807
} else {
806808
if (file_exists($conf['rootpath'] . '/conf-custom/index/standard_index.html')) {
807-
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');
809+
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');
808810
} else {
809-
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');
810-
if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')){
811+
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');
812+
if(is_file($conf['rootpath'] . '/conf/index/favicon.ico')) {
811813
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 . '/');
812814
}
813-
if(is_file($conf['rootpath'] . '/conf/index/robots.txt')){
815+
if(is_file($conf['rootpath'] . '/conf/index/robots.txt')) {
814816
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 . '/');
815817
}
816818
}

0 commit comments

Comments
 (0)