Ip access permission folders

October 23, 2014 1.2k views

I am very worried.

Typing the ip of my server, qualque person has access to all my sites and server files.

See here

How do I block the ip to access my sites and files?

1 Answer

To disable auto directory listings, you can add this to you Apache configuration:

<Directory /var/www>
  Options -Indexes

If you have a layout like /var/www/site1, /var/www/site2, etc... Make sure you don't still have a default configuration file still laying around with DocumentRoot /var/www

Have another answer? Share your knowledge.