Disable directory browsing Apache2 Debian8

Change Apache config file. Defult config is here: “/etc/apache2/sites-available/000-default.conf”

You can see similar this, without text in red box:


Add this text below to the config file:

<Directory “/var/www/html”>
Options Includes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all

Safe file

Restart Apache service

“sudo service apache2 restart”


You can test when create folders in root directory (in this eximple: /var/www/html) and try browsing this directory any web browser.


You can see like this error message when you did everything well.

I hope this short article will help for You!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s