【问题标题】:Apache/XAMPP does not give access to subdirectoryApache/XAMPP 不授予对子目录的访问权限
【发布时间】:2018-11-12 09:40:23
【问题描述】:

我将我的文档根目录设置为三个.js 的 git 存储库,根目录列出了除 examples/ 之外的所有子文件夹。它也没有列出以.(我猜是可以理解的)和README.md 开头的文件和文件夹。尝试直接访问examples 会出现503 错误。

任何地方都没有.htaccess 文件。任何地方都没有IndexIgnore。 Error.log 列出了这个:

[Sat Jun 02 13:35:08.169886 2018] [proxy:error] [pid 20844:tid 1996] (OS 10061)No connection could be made because the target machine actively refused it.  : AH00957: AJP: attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed
[Sat Jun 02 13:35:08.169886 2018] [proxy:error] [pid 20844:tid 1996] AH00959: ap_proxy_connect_backend disabling worker for (127.0.0.1) for 5s
[Sat Jun 02 13:35:08.169886 2018] [proxy_ajp:error] [pid 20844:tid 1996] [client 127.0.0.1:57788] AH00896: failed to make connection to backend: 127.0.0.1

【问题讨论】:

  • 你检查过Apache是​​否有权限读取这些文件吗?
  • 我不明白为什么它不会,整个存储库是同时创建的 (git clone),并且权限似乎并不异常。我还意识到这些示例不执行任何请求,因此我不需要服务器来运行它们,这与文档不同(从文件系统提供服务时会遇到 CORS 问题)。

标签: apache xampp


【解决方案1】:

在您的 apache conf 文件夹中,查看您是否有一个名为 /extra/httpd-ajp.conf 的文件,其中包含如下一行:

ProxyPass /examples ajp://127.0.0.1:8009/examples smax=0 ttl=60 retry=5

如果是这样,请注释掉或删除该行。为我解决了这个问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-07
    • 2013-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多