added index.php to default index list when php enabled

This commit is contained in:
Asif Bacchus 2019-01-08 01:48:37 -07:00
parent a83e0da7fa
commit 746144e40a
2 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@
-1,
19,
54,
754,
758,
68,
-1,
-1,

View File

@ -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