I have installed Ubuntu Server 7.04 linux and setup as LAMP Server. By default, directory browsing is enabled but it is not advisable on production website. I have searched the following information on how to disable directory listing on apache from linuxassassin‘s website.
For Ubuntu 7.04:
Browse on /etc/apache2/sites-available and edit default file.
Look for the section that looks like
<Directory /[some directory name]>
and your should see something like the following in the following line:
Options Indexes FollowSymLinks
To disable directory listing, just remove ‘Indexes’ from this line or change ‘Indexes’ to ‘-Indexes’
Make sure to restart your Apache server thereafter using
sudo /etc/init.d/apache2 restart
That’s it! Directory listing should be disabled now!



Jan 06, 2010 @ 00:52:00
thanks
Jun 16, 2011 @ 04:40:40
Thanks alot, have been looking alot after this:P! Does also work in Ubuntu 10.10.