关于Apache服务器不能访问,无权限,forbidden的各种问题

#######强力解决##########
修改服务器根目录(直接将你项目的文件夹复制过去,我的文件夹是pin,注意:修改之后的缺点,只能访问这一个项目了,哈哈  肯定不适合所有人,目前愁死我了,暂时这么解决)
#1.服务器访问的根目录,
DocumentRoot "e:/wamp/www/pin"
#2.将引用httpd-vhosts.conf这个文件的这一行代码注释掉
#Include conf/extra/httpd-vhosts.conf

--------------------------------------------------

Directory "e:/wamp/www/pin">
    #
    # 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

    #
    # 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
    #Require all granted   #添加允许外部访问


    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Require all granted
    #Require local

还有一点,与上面的无关,如果有的人是因为修改了权限之后
在相关的目录下将Require local或者Require all denied这两句话修改为Require all granted
启动不了服务器了,那么……恢复到原来的初始状态,重启一下电脑之后在修改这句话,就可以了,我就是这么好的,只是一个建议,不知道适用不适用所有人。

你可能感兴趣的:(大学日常)