# Request exceeded the limit of 10 internal redirects

**URL:** <https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891>\
**Category:** ℹ️ Support\
**Created:** [October 5, 2016, 9:50am UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891 "2016-10-05T09:50:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkawo](https://help.nextcloud.com/letter_avatar/alkawo/32/6_22734026db12803ebb3e059622ac3534.png) [@alkawo](https://help.nextcloud.com/u/alkawo)\
**Post date:** [October 5, 2016, 9:50am UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/1 "2016-10-05T09:50:08Z")

</div>

After migration from owncloud to nextcloud I get error 500 from apache webserver.

Apache log says:  
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuratio  
n error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

With LogLevel debug I see the redirect loop in the error log:  
AH00121: r-\>uri = /index.php  
AH00122: redirected from r-\>uri = /php5-fcgi/index.php  
AH00122: redirected from r-\>uri = /index.php  
AH00122: redirected from r-\>uri = /php5-fcgi/index.php  
AH00122: redirected from r-\>uri = /index.php  
…

## Apache Config for php5-fpm:

## AddHandler php5-fcgi .php .html Action php5-fcgi /php5-fcgi Alias /php5-fcgi /homepages/mycloud/htdocs/php5-fcgi FastCgiExternalServer /homepages/mycloud/htdocs/php5-fcgi -idle-timeout 1000 -socket /var/run/php5-fpm\_mycloud.sock -pass-header Authorization

Without .htaccess everything works fine.

Debian version 8.6  
apache2-mpm-worker 2.4.10-10+deb8u7  
php5-fpm 5.6.24+dfsg-0+deb8u1

Anyone knows how th solve this problem?

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [October 27, 2016, 6:58pm UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/2 "2016-10-27T18:58:57Z")

</div>

Check out the apache community. By default our configuration is tested with mod\_php. There is also a configuration example for nginx with fastcgi and there have been some reports that in some cases these fastcgi/fpm/… configurations can create problems (or these users weren’t able to figure out a proper configuration).

---

<div class="post-metadata">

**Author:** ![Wayne\_Gregori](https://help.nextcloud.com/letter_avatar/wayne_gregori/32/6_22734026db12803ebb3e059622ac3534.png) [@Wayne\_Gregori](https://help.nextcloud.com/u/Wayne_Gregori)\
**Post date:** [December 19, 2016, 1:15am UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/3 "2016-12-19T01:15:21Z")

</div>

Hi,

Did you ever figure out this problem. It’s happened to me again when i upgraded to Nextcloud 10.0.2

Thanks,  
Wayne

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [December 19, 2016, 10:26pm UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/4 "2016-12-19T22:26:00Z")

</div>

There was some other issue with fcgi, not sure if you can configure your server like this and if this is an option for you:

> [@Unable to access directories starting with a hash sign](https://help.nextcloud.com/t/unable-to-access-directories-starting-with-a-hash-sign/6308/5):
>
> Thanks, that set me on the right track. I previously used a ProxyPassMatch directive to connect to php-fpm: ProxyPassMatch ^/(.\*\.php(/.\*)?)$ fcgi://127.0.0.1:$port/var/www/owncloud/$1 The snap code uses a FilesMatch block and defines a handler with SetHandler instead to connect to php-fpm. Apparrently that’s now the preferred way to do it: \<FilesMatch \.php$\> SetHandler "proxy:fcgi://127.0.0.1:$port" \</FilesMatch\> With that, access to the directory works again. I still wonder what …

---

<div class="post-metadata">

**Author:** ![alkawo](https://help.nextcloud.com/letter_avatar/alkawo/32/6_22734026db12803ebb3e059622ac3534.png) [@alkawo](https://help.nextcloud.com/u/alkawo)\
**Post date:** [December 22, 2016, 11:01am UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/5 "2016-12-22T11:01:39Z")

</div>

I added the folowing code to my .htaccess:

RewriteCond %{REQUEST\_URI} !^/.well-known/acme-challenge/.\*  
**RewriteCond %{REQUEST\_URI} !^/php5-fcgi/**  
RewriteRule . index.php [PT,E=PATH\_INFO:$1]

My Apache config looks like:

AddHandler php5-fcgi .php .html  
Action php5-fcgi /php5-fcgi  
Alias /php5-fcgi /homepages/nextcloud/htdocs/php5-fcgi  
FastCgiExternalServer /homepages/nextcloud/htdocs/php5-fcgi -idle-timeout 1000 -socket /var/run/php5-fpm\_nextcloud.sock -pass-header Authorization

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [September 23, 2024, 6:20pm UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/6 "2024-09-23T18:20:43Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 12:25pm UTC](https://help.nextcloud.com/t/request-exceeded-the-limit-of-10-internal-redirects/3891/7 "2024-12-09T12:25:45Z")

</div>


