php-FPM: the Request exceeded the limit of 10 internal redirects due to probable configuration error


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » ./build php » php-FPM

php-FPM: the Request exceeded the limit of 10 internal redirects due to probable configuration errorLast Modified: Feb 14, 2013, 4:20 pm
DA 1.43.0 and newer will use the mod_proxy_fcgid (apache built-in module) instead of mod_fastcgi, so this guide will no longer apply.



If you are using php-FPM and get the following error in your Apache logs:

the Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary.

then you may need to setup an .htaccess file with mod_rewrite to prevent the recursive/infinite loop.   This report is specifically for WordPress sites.

Create the .htaccess file in your public_html folder, and add the following contents:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} !^/fastcgiphp
RewriteRule . index.php [L]


Note that if you're running php-fpm as php2_release, then you'd need to set it like this instead:
php2_release=5.4:

RewriteCond %{REQUEST_URI} !^/fastcgiphp54

php2_release=5.3:

RewriteCond %{REQUEST_URI} !^/fastcgiphp53

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST