美文网首页php
apache本地配置虚拟机,报“You don't have p

apache本地配置虚拟机,报“You don't have p

作者: 左木北鱼 | 来源:发表于2019-10-29 16:50 被阅读0次

    问题:

    本地wamp环境配置虚拟机,报错“You don't have permission to access / on this server.”


    报错

    解决:

    • 项目路径不是在htdocs
    • httpd.conf中添加配置,如下:
    DocumentRoot "G:/"
    <Directory "G:/">
        #
        # 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 Includes ExecCGI
    
        #
        # 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.
        #
        Require all granted
    </Directory>
    
    image.png
    • 重启,ok

    相关文章

      网友评论

        本文标题:apache本地配置虚拟机,报“You don't have p

        本文链接:https://www.haomeiwen.com/subject/hasgvctx.html