Professional Documents
Culture Documents
How To Disable Directory Browsing in Apache Configuration
How To Disable Directory Browsing in Apache Configuration
browsing in apache
configuration?
Home > Post Affiliate Pro > Frequently asked
questions > General questions > How to disable directory
browsing in apache configuration?
One of the “must do’s” on setting a secure apache web server is to disable directory browsing.
Usually apache comes with this feature enabled but its always a good idea to get it disabled unless you really need it.
First of all find where is the main apache’s config file apache2.conf is located.
To edit this file you will need root access to your server.
$sudo -i
Using some file editor like Vim or Nano open this file and find the line that looks as follows:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
then remove word Indexes and save the file. The line should look like this one:
<Directory /var/www/>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>