欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

程序员文章站 2022-03-15 22:32:11
...

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

wamp环境下You don't have permission to access / on this server.
ctrl+s保存即可
step2 完成第一步后发现仍然不能访问 需要进一步设置 找到如下图所示的文件
wamp环境下You don't have permission to access / on this server.
打开文件后修改两处:
第一处

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

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

<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>

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

再次访问网页:
wamp环境下You don't have permission to access / on this server.