码迷,mamicode.com
首页 > 数据库 > 详细

Apache2.4中出现You don't have permission to access / on this server.

时间:2015-08-07 16:11:46      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:apache   互联网   access   服务器   

注意Apache2.4跟以前版本配置不一的啊,弄了我很久

在配置apache工作出错:You don‘t have permission to access / on this server.

默认的apache的工作目录为:/usr/local/apache2/htdocs/
现在想修改为:/www


除了要修改:/usr/local/apache2/conf/http.conf文件中的工作目录:DocumentRoot "/www"外,记得要把对应的工作目录权限的地址一并修改过来,例如
DocumentRoot "/www"                                          //工作目录
     Directory "/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///工作目录需要的权限
    #
    # 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 None//工作目录需要的权限


    #
    # Controls who can get stuff from this server.
    #
    Require all granted//工作目录需要的权限
   </<b>Directory


修改好,运行,ok

版权声明:本文为博主原创文章,未经博主允许不得转载。

Apache2.4中出现You don't have permission to access / on this server.

标签:apache   互联网   access   服务器   

原文地址:http://blog.csdn.net/u013047660/article/details/47340223

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!