为了账号安全,请及时绑定邮箱和手机立即绑定

wamp 自定义网站根目录失败,求教?

wamp 自定义网站根目录失败,求教?

PHP
慕粉4282406 2017-04-24 08:33:44
win10系统wamp3.0.6apache 2.4.23修改httpd.conf为:<Directory />    AllowOverride none    Require all denied</Directory>## Note that from this point forward you must specifically allow# particular features to be enabled - so if something's not working as# you might expect, make sure that you have specifically enabled it# below.#HostnameLookups Off## DocumentRoot: The directory out of which you will serve your# documents. By default, all requests are taken from this directory, but# symbolic links and aliases may be used to point to other locations.#DocumentRoot D:/Demo<Directory "D:/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 +Multiviews    #    # 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>斜体部分修改后,无法访问test.php文件<?phpecho "成功";?>
查看完整描述

3 回答

?
我是新手_请多指教

TA贡献140条经验 获得超79个赞

不自定义根目录问题也不大,直接就把项目放在默认是wamp/www下就好了

查看完整回答
反对 回复 2017-04-24
?
西兰花伟大炮

TA贡献376条经验 获得超318个赞

你是从demo文件夹去访问的吗?
查看完整回答
反对 回复 2017-04-24
  • 3 回答
  • 2 关注
  • 1948 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信