【问题标题】:403 Apache error Forbidden You don't have permission to access /clientServerTest/ on this server403 Apache error Forbidden 您无权访问此服务器上的 /clientServerTest/
【发布时间】:2015-01-20 16:45:54
【问题描述】:

我正在尝试在线连接到我的 wampserver 2.4,但出现以下错误: Forbidden You don't have permission to access /clientServerTest/ on this server. 错误日志显示:

[Sun Jun 08 21:53:45.281433 2014] [access_compat:error] [pid 6696:tid 1492] [client 192.168.0.7:52659] AH01797: client denied by server configuration: C:/wamp/www/favicon.ico

我浏览了一段时间并查看了this answerthis other one,但到目前为止还没有运气。 服务器是already online,我可以使用localhost 访问它。但是,当我尝试在本地网络上使用我的电脑的ipv4 连接到它时,我收到了错误。

我使用的是 Windows 7。

防火墙已经关闭。

有人可以帮我解决这个问题吗?

【问题讨论】:

  • 如果您尝试远程访问服务器,请单击 Wamp -> Put Online。或者尝试使用127.0.0.1而不是localhost访问服务器,看看是否有效
  • 是的,我已经这样做了,抱歉,问题可能不清楚

标签: apache wamp wampserver


【解决方案1】:

更好的解决方案是这样做

#   onlineoffline tag - don't remove
Require local
Require ip 192.168.0

或者本地子网的前 3 个四分位数是什么。 这使用 Apache 2.4 语法而不是 Apache 2.2 语法,并允许访问所有可能的 localhost 变体和本地网络,但不能访问世界。

这样,当您决定打开路由器时,您就不会意外地允许您访问所有开​​发站点。

您必须对别名文件夹中的所有 3 个应用程序配置执行此操作。

【讨论】:

  • 谢谢!我稍后会测试它!到目前为止,我正在做的只是一个个人项目来练习
  • 当然可以,但是最好练习正确的方法而不是错误的方法。
【解决方案2】:

啊...显然我发现了问题所在... 在httpd.config文件中如下sn-p(可以从wamp菜单访问):

#   onlineoffline tag - don't remove
Order Deny,Allow
Deny from all

我删除了Deny form all 并输入了Allow from all,所以现在它看起来像:

#   onlineoffline tag - don't remove
Order Deny,Allow
Allow from all

不确定这是正确的解决方案...但至少我可以连接

【讨论】:

    猜你喜欢
    • 2019-02-16
    • 2017-06-22
    • 2013-09-27
    • 2019-10-17
    • 2020-01-11
    • 2015-10-20
    • 1970-01-01
    • 2014-03-20
    • 2014-04-14
    相关资源
    最近更新 更多