Apache2.4.18 错误403

查看:184
本文介绍了Apache2.4.18 错误403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

1.背景:
小弟菜鸟,想在公司局域网搭建web管理系统,但是在搭建环境时遇到问题百度1天都没百出来 啥,都是过期复制粘贴的答案。
2.环境:
安装环境:
1)Win7Pro(32bit)中文(非虚拟机)
2)Wampserver3.0.4(Server Software:Apache/2.4.18 (Win32) PHP/5.6.19 - Port defined for Apache: 80)
3.问题描述:
1)安装完wampserver后启动正常,通过localhos,本机ip,127.0.0.1都可以访问正常。
但是我在局域网其它机器上访问服务会提示访问拒绝没有权限巴拉巴拉巴拉。。如下截图:

错误日志:

[authz_core:error] [pid 4544:tid 864] [client 192.168.221.122:49359] AH01630: client denied by server configuration: C:/wamp/www/favicon.ico
[authz_core:error] [pid 4544:tid 856] [client 192.168.221.122:49363] AH01630: client denied by server configuration: C:/wamp/www/

2)出现上面问题让我这个菜鸟都市懵逼了,百度谷歌都没解决,大部分答案是修改http.conf目录访问权限,然后我也修改了,允许所有访问重启服务重启电脑,但是还是出现上面访问拒绝

DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/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 all

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

#   onlineoffline tag - don't remove
#    Require local
     Require all granted
</Directory>

4.总结:
折腾一天了,太累人了,求大神指点,感谢不尽

解决方案

这个问题也是搞了好半天。。。。。apache 2.4.18** 结果是:还需要修改 Virtual Hosts 文件在conf/extra/httpd-vhosts.conf !!!!!

<VirtualHost *:80>

ServerName localhost
DocumentRoot d:/wamp/www
<Directory  "d:/wamp/www/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
    Require all granted
</Directory>

</VirtualHost>

这篇关于Apache2.4.18 错误403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆