wamp环境下You don't have permission to access / on this server.

来源:互联网 发布:贝佳斯白泥怎么样知乎 编辑:程序博客网 时间:2024/05/16 07:06

一.问题描述
当我们把wamp环境在服务器上搭建好并成功启动的时候,本地环境localhost能成功访问,但通过域名访问却提示:“You don’t have permission to access / on this server.”
这里写图片描述
二.解决办法
step1:打开下图所示文件
这里写图片描述
用记事本修改文件信息为允许全部访问

这里写图片描述
ctrl+s保存即可
step2 完成第一步后发现仍然不能访问 需要进一步设置 找到如下图所示的文件
这里写图片描述
打开文件后修改两处:
第一处

<Directory />    Options FollowSymLinks    AllowOverride None    Order deny,allow    Allow from all</Directory>

这里写图片描述
第二处

<Directory "${INSTALL_DIR}/www/">    #    # 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    Order Deny,allow    Allow from all</Directory>

这里写图片描述

再次访问网页:
这里写图片描述

阅读全文
0 0