Apache Options Indexes FollowSymLinks
Disable Apache directory list-Indexes FollowSymLinks
How to modify the directory configuration to disable the display of the Apache directory list.
By default, if you enter the address in the browser:
Http: // localhost: 8080/
If the root directory of your file contains index.html, the browser will display the content of index.html. If there is no index.html, the browser will display the Directory List of the root directory of the file, the directory list includes files and subdirectories under the root directory of the file.
Similarly, enter the address of a virtual directory:
Http: // localhost: 8080/B/
If the virtual directory does not contain index.html, the browser will also display the directory structure of the virtual directory, listing the files and subdirectories under the virtual directory.
How can I disable Apache from displaying a directory list?
To disable Apache from displaying the directory structure list, you only need to remove Indexes from Option.
For example, let's look at the directory configuration of a directory:
<Directory "D:/Apa/blabla">
Options Indexes FollowSymLinks # ----------> Options FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</Directory>
You only need to remove the Indexes in the above Code to disable Apache from displaying the directory structure. The user will not see the list of files and subdirectories under this directory.
Indexes is used to display the directory structure when no index.html file exists in the directory. If Indexes is removed, Apache will not display the list of directories.
Method 2
Solution:
1. Edit the httpd. conf file
Vi./conf/httpd. conf
Find the following content:
? BR> <Directory "C:/Program Files/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All ",
# Or any combination:
Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named * explicitly *-"Options All"
# Doesn' t give it to you.
#
# The Options directive is both complicated and important. Please see
# Http://httpd.apache.org/docs/2.2/mod/core.html#options
# For more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in. htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow, deny
Allow from all
</Directory>
......
Add the-symbol before Indexes in Options Indexes FollowSymLinks.
That is, Options-Indexes FollowSymLinks
[Note: Before Indexes, add + to allow directory browsing; add-to prohibit directory browsing .]
In this case, the entire Apache directory browsing is prohibited.
To add the following information to a VM:
<Directory "D: test">
Options-Indexes FollowSymLinks
AllowOverride None
Order deny, allow
Allow from all
</Directory>
In this way, directory browsing under the test project is prohibited.
Note: Do not change "Allow from all" to "Deny from all". Otherwise, the entire website cannot be opened.
<Finished>
Another method is as follows:
You can enter
<Files *>
Options-Indexes
</Files>
This prevents Apache from listing the directory structure.
Configure the LAMP + phpMyAdmin PHP (5.5.9) development environment in Ubuntu 14.04
Ubuntu 14.10 text tutorial on hard drive installation in Windows 7
Install Ubuntu 14.10 on a USB flash drive
Official release and download of Ubuntu 14.10
How to upgrade Ubuntu 14.04 LTS to Ubuntu 14.10
Install LAMP in Ubuntu 14.10
This article permanently updates the link address: