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

一、问题描述

当我们把wamp环境在服务器上搭建好并成功启动的时候,本地环境localhost能成功访问,但通过域名访问却提示:“You don’t have permission to access / on this server.”

二、解决办法

1、打开下图所示文件

2、用记事本修改文件信息为允许全部访问

3、ctrl+s保存即可

4、完成第一步后发现仍然不能访问 需要进一步设置 找到如下图所示的文件

5、打开文件后修改两处:

第一处

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

6、再次访问网页:

转自:https://blog.csdn.net/asd245025733/article/details/77934524

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注