Disable Apache from displaying directory indexes, prohibiting Apache from displaying a list of directory structures, and prohibiting Apache from browsing directories. This is a lot of online questions, but it is actually a meaning. The following are three common ways to prohibit Apache from displaying directory indexes.
To disable Apache from displaying directory indexes, simply remove the Indexes from Option.
1) Modify the directory configuration:
<Directory "D:/Apache/blog.phpha.com"> Options Indexes FollowSymLinks # Modify to: Options FollowSymLinks AllowOverride None Order allow, Deny Allow from all </Directory>
Just remove the Indexes from the above code to prevent Apache from displaying the directory structure. Users will not see the list of files and subdirectories under this directory. The role of Indexes is to display the directory structure when there is no index.html file in the directory. If Indexes is removed, Apache will not display the list of directories.
2) Modify the Apache configuration file [httpd.conf]
Search “Options Indexes FollowSymLinks”, change to “Options -Indexes FollowSymLinks” In the Options Indexes FollowSymLinks, precede the Indexes with the – symbol. Note: Before Indexes, add + to allow directory browsing; add – to prohibit directory browsing. In this case, it belongs to the entire Apache banned directory browsing. If you are configuring a virtual machine, the following is true:
<VirtualHost *> <Directory "../vhosts/blog.phpha.com"> Options -Indexes FollowSymLinks # Modify to -Indexes </Directory> ServerAdmin [email protected] DocumentRoot "../vhosts/blog.phpha.com" ServerName shopex:80 ServerAlias blog.phpha.com ErrorLog logs/blog.phpha.com-error_log </VirtualHost>
3) via the .htaccess file
You can add
<Files *> Options -Indexes </Files> to the root directory to create or modify the .htaccess file.
You can disable Apache from displaying directory indexes.
The Web server is built on the line, and it can carry large amount of traffic, res
using the Web interface When installing network devices, such as network cards, we seem to inevitab
The role of the Windows file server in the network is crucial. They host sensitive files, databases,
Previously deployed a cwRsync service for a customer to achieve synchronous backup between two windo
What should I do if apache is installed and cannot be started?
Windows 2003 Campus Web Server Frequently Asked Questions
Using DOS commands to remotely manage FTP servers
PHP probe recommendation: a good helper for detecting server environment
The most complete in history! Proxy server settings method highlights
"227 Entering Passive Mode" solution when FTP connection
Detailed explanation: Ten processor parameters of server processor products
Zend Optimizer configuration instructions in php.ini
Install IIS prompts the installer can't copy the file staxmem.dll solution
How does the Win7 system hide the desktop IE browser icon?
How to use PE to partition Windows 7 system hard disk
Windows7 how to set three passwords to enter the wrong lock computer
Win10 view two ways of Ip address
Small operator anti-sealing mechanism Thunder Mac version 2.6.2 update released
Teach you to easily and anti-virus Share the anti-drug elite under the command line
Five snacks to improve BT download speed