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!