Detailed description of Apache Options Indexes FollowSymLinks, followsymlinks

Source: Internet
Author: User

Detailed description of Apache Options Indexes FollowSymLinks, 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
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
       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://
             # 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


  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
    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.

 Another method is as follows:

You can enter

<Files *>
This prevents Apache from listing the directory structure.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.