Server folder listing appears in browser

2

I have on the server installed Debian , Apache , PHP5 and MySql .

When you type in the browser the address of a folder, for example link , all folders and files are listed.

How do I make folders and files not listed in the browser?

    
asked by anonymous 07.06.2015 / 01:20

1 answer

3

To not list your directories, use this directive:

Options -Indexes

In .htaccess or in the directory configuration:

<Directory /www/pasta>
   Options -Indexes
</Directory>

Sources:

Disabling directory listing in Apache

Is it possible to deny access to the directory and allow access to the .htaccess file? How?

Protect folder against direct access

    
07.06.2015 / 01:49