Skip to content


Apache 2.4: solving AH00125 (Request exceeded the limit of 10 subrequest…)

So I’m yet again in the middle of a painful Apache configuration, and with the major update (from version 2.2 shipped with Debian 7 to version 2.4 shipped with Debian 8) come the major annoyances as usual. When loading folders with no index.htm/.php, I noticed Apache threw errors at me instead of simply diplaying “Forbidden”. Something just like:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

So I checked the log and saw quite a few of these:
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.

I suppose this recursivity accident can be caused by a various amount of causes. In my case the problem came from a misconfigured DirectoryIndex (in mods-available/php5.conf) : I had added a comment at the end, which used to work without issue in Apache 2.2.

DirectoryIndex index.html index.htm index.php #(seems optional now)

But apparently # is a valid character and not a comment starter if not at the beginning of a line, so in Apache 2.4 it creates that AH00125 error when loading a folder with no DirectoryIndex. As my own comment said, this line seems optional now, so for me the fix was just to remove it. Now I’ve got another error, but it seems quite unavoidable (“AH01276: Cannot serve directory /home/xxx/: No matching DirectoryIndex (index.html, index.cgi, index.pl, index.php, index.xhtml, index.htm) found, and server-generated directory index forbidden by Options directive“). Or maybe I should just put an empty index.htm file in there.

Source where I found the solution: Mailing List Archive: Apache: Dev – How to help users diagnose invalid # in DirectoryIndex?

Posted in servers.

Tagged with .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA