apache 403错误 Forbidden解决方法

2020-01-30 12:29:18于海丽


发现了以下内容
#
# This should be changed to whatever you set DocumentRoot to.
#
以上这行注释的意思:无论你的服务器根目录设置为什么,你都必须保证此处配置保持一致!

以下为引用的内容:
<Directory "默认目录">
        #
        # 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.2/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:
        #      Options FileInfo AuthConfig Limit
        #
        AllowOverride None

        #
        # Controls who can get stuff from this server.
        #
        Order allow,deny
        Allow from all

</Directory>

再将以上的"默认目录"设置为"目标目录",(当然已经将对所有权限访问的设置修改为拒绝了!)刷新一下页面,OK,通过了!