added index.php to default index list when php enabled
This commit is contained in:
parent
a83e0da7fa
commit
746144e40a
2
.vscode/numbered-bookmarks.json
vendored
2
.vscode/numbered-bookmarks.json
vendored
@ -6,7 +6,7 @@
|
|||||||
-1,
|
-1,
|
||||||
19,
|
19,
|
||||||
54,
|
54,
|
||||||
754,
|
758,
|
||||||
68,
|
68,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
|
4
setup.sh
4
setup.sh
@ -736,6 +736,8 @@ if [ "${phpType}" = "tcp" ]; then
|
|||||||
sed -i "s/${tag_phpPort}/${phpPort}/" "${configPath}/${file_phpTCP}"
|
sed -i "s/${tag_phpPort}/${phpPort}/" "${configPath}/${file_phpTCP}"
|
||||||
# copy .insert file into nginx.conf
|
# copy .insert file into nginx.conf
|
||||||
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpTCP}" -e 'd}' "${configPath}/${file_phphandler}"
|
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
|
fi
|
||||||
|
|
||||||
# if using PHP-SOCK: add upstream handler in nginx.conf
|
# 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}"
|
sed -i "s%${tag_phpSock}%${phpSock}%" "${configPath}/${file_phpSock}"
|
||||||
# copy .insert file into nginx.conf
|
# copy .insert file into nginx.conf
|
||||||
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpSock}" -e 'd}' "${configPath}/${file_phphandler}"
|
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
|
fi
|
||||||
|
|
||||||
# notify user file updates are completed
|
# notify user file updates are completed
|
||||||
|
Loading…
Reference in New Issue
Block a user