Disable directory listing (index) in Apache

Open the file:
/etc/apache2/httpd.conf
And add the following line line:
Options –Indexes
Restart Apache:
sudo /etc/init.d/apache2 reload

OR

/etc/apache2/sites-availabl/[sitename]
find line:
Options Indexes FollowSymLinks MultiViews
And add “” in front of the “Indexes“:
Options -Indexes FollowSymLinks MultiViews
sudo /etc/init.d/apache2 reload

Ubuntu Server

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *