open /etc/apache2/apache2.conf
And the section of the settings that deals with listing directory in Apahce2 default root directory is this:
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
To disable directory listing, edit the setting to be this:
<Directory /var/www/> Options FollowSymLinks AllowOverride None Require all granted </Directory>
Save the file and restart Apache2 to load the new configuration settings.
No comments:
Post a Comment