The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

500 Internal Server Error

Discussion in 'EasyApache' started by dreamteamone, Feb 27, 2016.

  1. dreamteamone

    dreamteamone Member

    Joined:
    Feb 15, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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!
     
  2. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please check the .htaccess rule in your document root, there will be a complected redirect.
     
  3. dreamteamone

    dreamteamone Member

    Joined:
    Feb 15, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,774
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. Eoler

    Eoler Registered

    Joined:
    Mar 1, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kastav, Croatia
    cPanel Access Level:
    Root Administrator
    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...
     
    #5 Eoler, Mar 1, 2016
    Last edited by a moderator: Mar 1, 2016
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,774
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,774
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page