dreamteamone

Member
Feb 15, 2009
6
0
51
Hi,

I am getting the following error when running a PHP web application on fresh installation of CentOS 7 (64bit) with latest version of cPanel:

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

/usr/local/apache/logs/error_log is showing me the following:

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

The script is running perfectly fine on older server, how can I resolve this?

Thank you very much!
 

syslint

Well-Known Member
Verifed Vendor
Oct 9, 2006
266
7
168
India
cPanel Access Level
Root Administrator
Twitter
Please check the .htaccess rule in your document root, there will be a complected redirect.
 

dreamteamone

Member
Feb 15, 2009
6
0
51
Please see the .htaccess content below:

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]

RewriteRule ^assets/(.*)$ public/assets/$1 [L]
RewriteRule ^avatars/(.*)$ public/avatars/$1 [L]
RewriteRule ^wallpapers/(.*)$ public/wallpapers/$1 [L]
RewriteRule ^verify-existence$ public/verify.php [QSA,L]
RewriteRule ^proxy.php$ public/proxy.php [QSA,L]
RewriteRule ^api/v([0-9]*)/(.*)/?$ public/api.php?path_info=$2&api_version=$1 [QSA,L]
RewriteRule ^$ public/router.php [QSA,L]
RewriteRule ^(.*) public/router.php?path_info=$1 [QSA,L]
</IfModule>

It's working properly on older server, but it's giving errors on CentOS 7 with cPanel.

Thank you!
 

Eoler

Member
Mar 1, 2016
9
3
3
Kastav, Croatia
cPanel Access Level
Root Administrator
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
I have the same problem after upgrading Apache/PHP with EasyApache 3.32.10, on a rewrite that looks fine to me:
github.com/octobercms/october/blob/master/.htaccess#L31-L68

Confused...
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

EasyApache version 3.32.10 includes the following change:

Implemented case EAL-2996: Apache 2.4 allows authorization bypasses with misconfigured .htaccess files

This change essentially prevents the use of invalid Mod_Rewrite rules in .htaccess files. Internal case EAL-3030 is open to track instances where this happens for valid rewrite rules. Could anyone experiencing this issue with known "valid" rewrite rules open a support ticket using the link in my signature so we take a closer look?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
EasyApache version 3.32.11 removes the rewrite hardening patch from Apache:

Implemented case ZC-1506: Remove rewrite hardening patch from Apache

You can rebuild Apache via EasyApache to ensure this change is implemented on your system.

Thank you.