2021-06-25 lamp-install.sh update

An update to the lamp-install.sh file is live where the directory autoindex module is disabled by default for the entire server.

If you want to apply this manually after having installed the lamp-server using this script, simply do the following from a root (or sudo user) command line:

sudo a2dismod –force autoindex
sudo systemctl restart apache2

must have sudo privileges to apply the change

This is a simply change, but can drastically improve a website’s security. This is now the default behavior. There may be cases where you legitimately want to expose directory indexes. In this case, simply do the following:

sudo a2enmod –force autoindex
sudo systemctl restart apache2

must have sudo privileges to apply the change

This will enable directory indexes. Beware that this exposes lists of all contents to anyone who is browsing. There are cases where this is desired behavior, but those are few.