Apache Web服务器:AH00125:请求超过了使用FallbackResource的10个子请求的限制

时间:2015-11-02 12:19:39

标签: apache httpd.conf

当我在我的apache 2.4 web服务器配置中使用“FallbackResource”时,它显示错误“AH00125:请求超过了10个子请求嵌套级别的限制”..

请帮忙解决一下这个问题。 指定网址“http://localhost/bv-host/plusRoot/plus/fiets”并希望将其转发到默认的index.html:“/ bv-host / plusRoot / plus / index.html”

我启用了调试日志记录。模式重写被禁用。如果我删除了FallbackResource行,我没有看到这个错误,而是一个例外的404错误。

我的Mac上安装了默认的2.4,并添加了以下配置:

FallbackResource /bv-host/plusRoot/plus/index.html;
Alias /bv-host/plusRoot "/Users/ed/Develop/Projecten/Web”

就是这样,调试日志记录片段:

[client ::1:57840] mod_hfs_apple: Allowing access with matching directory. filename = /Users/ed/Develop/Projecten/Web/plus/index.html;
AH00125: Request exceeded the limit of 10 subrequest nesting levels due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[client ::1:57840] AH00121: r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/index.html;
[client ::1:57840] AH00123: subrequested from r->uri = /bv-host/plusRoot/plus/fiets

3 个答案:

答案 0 :(得分:4)

我在子文件夹中设置Silex应用程序时遇到了类似的问题。我只使用了FallbackResource index.php,结果相同。

使用经典的Rewrite示例结束。

RewriteEngine On
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

答案 1 :(得分:2)

我也遇到了这个问题并找到了解决方案。

在我的情况下,发生这种情况是因为页面请求的资源(它是一个css文件)没有放在好的目录中。

<link href="somewhere_bad_directory/font-awesome.min.css" rel="stylesheet" type="text/css">

然后FallbackResource被调用十次并且没有提供资源,因此错误。

解决方案:使用&#34; FallbackResource&#34;在目录中,如果您有此错误&#34; AH00125:请求超出了10个子请求嵌套级别的限制&#34;,请仔细检查您的页面是否存在放错位置的资源。

答案 2 :(得分:1)

请注意,如果FallbackResource路径不是绝对路径,也会出现此错误。例如:

FallbackResource index.php

将在任何第二级请求上失败:/ foo / bar将失败,因为它将尝试回退到/foo/index.php。因此,您需要指定根目录:

FallbackResource /index.php