0

I just created a subdomain called virtual from cPanel and its return 500 error. When I check the error_log I see below error:

AH00124: Request exceeded the limit of 10internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://myhostname.com/index.html

here is full log:

[Mon May 09 06:21:16.819771 2022] [core:error] [pid 16737:tid 47256050861824] [client 182.2.38.229:64126] AH00124: Request exceeded the limit of 10internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819775 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3931): [client 182.2.38.229:64126] AH00121: r->uri = /public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819778 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819781 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819784 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819787 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819790 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819793 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819796 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819799 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819802 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /public/path/favicon.ico, referer: http://virtual.myhostname.com/index.html
[Mon May 09 06:21:16.819811 2022] [core:debug] [pid 16737:tid 47256050861824] core.c(3938): [client 182.2.38.229:64126] AH00122: redirected from r->uri = /favicon.ico, referer: http://virtual.myhostname.com/index.html

The virtualhost path should on /home/user/public_html/path, but why from the log it's redirected to /public/path ? I don't have .htaccess on that path, even I add .htaccess it's no effect.

here is virtualhost that generated by WHM/cPanel:

<VirtualHost myip:80>
  ServerName virtual.myhostname.com
  ServerAlias www.virtual.myhostname.com
  DocumentRoot /home/user/public_html/path
  UseCanonicalName Off

  ## User user # Needed for Cpanel::ApacheConf
  <IfModule userdir_module>
    <IfModule !mpm_itk.c>
      <IfModule !ruid2_module>
        <IfModule !mod_passenger.c>
          UserDir disabled
          UserDir enabled user
        </IfModule>
      </IfModule>
    </IfModule>
  </IfModule>
    <IfModule mod_include.c>
    <Directory "/home/user/public_html/path">
      SSILegacyExprParser On
    </Directory>
  </IfModule>


  <Proxymatch ^https?://127\.0\.0\.1:(2082|2083|2077|2078|2079|2080|2086|2087|2095|2096)/>
       <IfModule security2_module>
          SecRuleEngine Off
       </IfModule>
       <IfModule security3_module>
          modsecurity_rules 'SecRuleEngine Off'
       </IfModule>
  </Proxymatch>

  <IfModule mod_suphp.c>
    suPHP_UserGroup user user
  </IfModule>
  <IfModule suexec_module>
    <IfModule !mod_ruid2.c>
      SuexecUserGroup user user
    </IfModule>
  </IfModule>
  <IfModule ruid2_module>
    RMode config
    RUidGid user user
  </IfModule>
  <IfModule mpm_itk.c>
    AssignUserID user user
  </IfModule>
  <IfModule mod_passenger.c>
    PassengerUser user
    PassengerGroup user
  </IfModule>

  <IfModule alias_module>
    ScriptAlias /cgi-bin/ /home/user/public_html/path/cgi-bin/
  </IfModule>
  </IfModule>
</VirtualHost>

The other subdomain use same generated virtual host config like above but it's working fine. What is the reason for that problem?

1 Answer 1

0

After I disabled "Restrict document roots to public_html" from WHM tweaked settings and then I remove public_html from the subdomain directory, it's working fine. So my current path /home/user/path.

It seems my server has an auto redirect path for some cases.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .