First, I search online.Apache disables directory browsingThen find the following method:
Httpd. conf option
Set Options Indexes FollowSymLinks
Modify
Options FollowSymLinks
But I found that in apache httpd. the Options Indexes FollowSymLinks is not found in the conf configuration file. So I searched Options FollowSymLinks and found it. As mentioned above, the directories will not be listed, but I still listed them.
So I carefully read its Options FollowSymLinks and wrote it
The code is as follows: |
Copy code |
<Directory/> Options FollowSymLinks AllowOverride None Order allow, deny Allow from all </Directory> |
After that, I didn't restart apahce. I thought we should add it to the website directory.
Then, find <Directory "x: xxx"> This is the web Directory of the website, and add
Options FollowSymLinks
Example
The code is as follows: |
Copy code |
<Directory "x: xx"> Options FollowSymLinks AllowOverride None Order allow, deny Allow from all </Directory> |
Restart apache and check whether the list of website directories is displayed.