Topic: Disable directory browsing in Apache (Read 656 times)
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8133
41755 credits Members referred : 3
« on: Apr 10, 2006, 12:28:49 PM »
This is a small tutorial that you can use to disable directory browsing in the apache web server.
If you don't know what directory browsing is, it is a feauture, that lets the user browse the whole directory structure of your web site, when there is no index file present. In many cases that can lead to security issues, so it is better to disable it.
First of all you need to open your httpd.conf file with your favourite text editor. This file is usually located at /etc/httpd/conf/httpd.conf or /usr/local/apache/conf/httpd.conf on most linux installations. If you can't find it then you can execute something like this :
Code:
locate httpd.conf
Now to disable the directory browsing you have to remove the Options Indexes directive. To be more specific, there must be a line in your httpd.conf file that is like this :
Code:
Options All Indexes FollowSymLinks MultiViews
Replace that with this :
Code:
Options All FollowSymLinks MultiViews
Now to see the results and actual disable the directory browsing, you have to restart the server, and you are done