Home / Articles / Linux / Disabling Apache Directory Browsing

Disabling Apache Directory Browsing

Disabling directory browsing on apache2. First thing you will need to go is browse into the following directory:

/etc/apache2/sites-available

Once you are in there, edit the default site (vi default):

Under virtualhost, you will see a <Directory /> and the next line should be Options followed by +FollowSymLinks

Next, -Indexes so it should look something like this:


DocumentRoot /var/www/
CustomLog /var/log/apache2/access.log common
ServerName 192.168.0.1

Options +FollowSymLinks -Indexes
AllowOverride none

After this, make sure to restart apache2:

/etc/init.d/apache2 restart

Share


Comment on Disabling Apache Directory Browsing

Leave a Reply






Contact Us