Prohibit Apache display directory index, prohibit Apache display directory structure list, prohibit Apache Browse directory, this is the online question more, in fact, is a meaning. The following is a list of common 3 ways to prohibit Apache from displaying directory indexes. To implement a ban on Apache from displaying directory indexes, simply remove the Indexes in Option.
1) Modify the directory configuration:
Just remove the Indexes from the above code to prevent Apache from displaying the directory structure. The user will not see a list of files and subdirectories under that directory. The role of Indexes is that when there is no index.html file in the directory, the directory structure is displayed, and the Indexes is removed, and Apache does not display a list of that directory.
" d:/apache/blog.phpha.com "> from all </Directory>
2) Modify Apache configuration file [httpd.conf]
Search for "Options Indexes followsymlinks" and Change to "Options-indexes followsymlinks". In the options Indexes followsymlinks in front of the Indexes plus – symbol. Note: Before indexes, the Plus + delegate allows directory browsing; plus – disables directory browsing. This is the entire Apache Ban directory browsing. If you are configuring a virtual machine, the following:
<virtualhost *> <directory".. /vhosts/blog.phpha.com">Options-indexes FollowSymLinks # Modified to-Indexes can</Directory>ServerAdmin [email protected] documentroot".. /vhosts/blog.phpha.com"ServerName Shopex: theserveralias blog.phpha.com errorlog logs/blog.phpha.com-Error_log</VirtualHost>
3) through the. htaccess file
You can add new or modified. htaccess files in the root directory
<files *>-Indexes</Files>
You can disable Apache from displaying directory indexes.
Common ways to prevent Apache from displaying directory indexes (Apache forbidden list)