This script will disable webserver’s directory index for currect directory and all subdirectories.
IFS=$'\n'
for i in $( find . -type d); do
if [[ ! -f "$i/index.html" && ! -f "$i/index.php" ]]; then
touch "$i/index.html"
fi
done
Yejun Linux, Web bash, index, webserver