From 746144e40a0bd27d85f22398024b5c670e3486fb Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 8 Jan 2019 01:48:37 -0700 Subject: [PATCH] added index.php to default index list when php enabled --- .vscode/numbered-bookmarks.json | 2 +- setup.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/numbered-bookmarks.json b/.vscode/numbered-bookmarks.json index 9a886f1..fe866c3 100644 --- a/.vscode/numbered-bookmarks.json +++ b/.vscode/numbered-bookmarks.json @@ -6,7 +6,7 @@ -1, 19, 54, - 754, + 758, 68, -1, -1, diff --git a/setup.sh b/setup.sh index ae1a5b4..a9af728 100755 --- a/setup.sh +++ b/setup.sh @@ -736,6 +736,8 @@ if [ "${phpType}" = "tcp" ]; then sed -i "s/${tag_phpPort}/${phpPort}/" "${configPath}/${file_phpTCP}" # copy .insert file into nginx.conf sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpTCP}" -e 'd}' "${configPath}/${file_phphandler}" + # add index.php to default index files + sed -i 's/^\s*index/\ index index.php/' "${configPath}/${file_phphandler}" fi # if using PHP-SOCK: add upstream handler in nginx.conf @@ -745,6 +747,8 @@ if [ "${phpType}" = "sockets" ]; then sed -i "s%${tag_phpSock}%${phpSock}%" "${configPath}/${file_phpSock}" # copy .insert file into nginx.conf sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpSock}" -e 'd}' "${configPath}/${file_phphandler}" + # add index.php to default index files + sed -i 's/^\s*index/\ index index.php/' "${configPath}/${file_phphandler}" fi # notify user file updates are completed