When I tried to install Drupal 8 Varbase distribution and visited its sub pages as anonymous user (like Login page https://www.webfoobar.com/user/login) I get this error message in my browser:
This page isn’t working
www.webfoobar.com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS
... and the URL changed to:
https://www.webfoobar.com/user/login?q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login&q=user/login
The error did not occured in fron page and when logged in as administrator just right after Varbase was installed. I investigated the issue and I found out that the Redirect module causes this infinite loop error.
After some debugging, I finally fixed the error by changing the following nginx configuration lines from:
location / {
try_files $uri $uri/ @indexphp;
}
## Support for clean URL
location @indexphp {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
... to:
location / {
try_files $uri $uri/ /index.php;
}
Then clear the cache at http://www.webfoobar.com/admin/config/development/performance or by executing:
drush cache-rebuild
Thank you very much!!!
Thank you very much!!!