One of my webiste having trouble in blocking Apache forced directory listing for some folder/dir files. Now I need to close for public visitors of my website, can anyone tell me Is there any options to block or hide these default directory listing problems? If you have any short code or script to do this. Dont tell me to create index.php for these directories , sugg.me from Apache side blocking.
If you can access the httpd.conf file for that website, make sure that you have set very strict permissions on EVERYTHING, then modify individual directories. Your first <Directory> statement should look like this: <Directory /> Options Includes FollowSymLinks AllowOverride None </Directory> For any directory that you want more relaxed permissions on, make a specific directive for it.
http://httpd.apache.org/docs/2.2/mod/core.html#options Within the htaccess for any directory you don't want mod_autoindex working in, turn off Indexes. Options -Indexes Code (markup): To turn it on, you use a plus symbol instead of a hyphen. Options +Indexes Code (markup): Remember that when you don't use a +/- in front of an option, it resets the values of anything that's been set earlier. so if you had FollowSymLinks turned on in your virtual host, and you did the following, something may break. Options Indexes Code (markup): Also note that setting Options in htaccess requires that the Options override allows it. http://httpd.apache.org/docs/2.2/mod/directive-dict.html#Override