How to configure the local web environment so that the file directory can be displayed when accessing?
I'm not very professional. I don't know what professionals say about this problem, so I couldn't find it on Baidu.
Please give me some advice
httpd-vhost.conf Virtual host configuration:
请输入代码
<VirtualHost *>
DocumentRoot ./htdocs/book
ServerName www.book.com
ErrorLog logs/boook-error_log
</VirtualHost>
If it is under apache, the configuration is as follows:
fileMethod 1:
httpd.conf
开启mod_autoindex
Module (enabled by default)Turn on directory listing function:
Options +Indexes
Turn off directory listing function:
Options -Indexes
Method 2:
Add
.htaccess
to the root directoryTry the above configuration, if it doesn’t work, change all paths in the configuration to absolute paths and try again,
apache