环境是wamp3,apache是2.4的,之前用wamp2.5的时候,documentroot指定为h:demo(主目录下没有index.php之类的),每次打开localhost是一个所有项目的目录,这次更新完wamp3,发现打开localhost是not found,但是输入localhost/test/ 能打开项目(test下有index.php)说明documentroot什么的配置是对的,我查了下如何显示apache目录。
回答说http.conf中
Options Indexes FollowSymLinks
可我发现我是有这项的
<Directory "H:/Demo">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# 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.4/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:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Require local
</Directory>
Options Indexes FollowSymLinks
去掉
Indexes
变为
Options FollowSymLinks