Error Too Many Redirects - Varnish Cache Issue

Started by digitalmango, March 17, 2021, 04:18:07 AM

Previous topic - Next topic

digitalmango

Hi,
It's been a few months I've got CWP  Pro and I've selected Apache, Nginx with Varnish Cache server for faster websites. Since then I'm facing this new issue "Error Too Many Redirects". After lot of testing I found if I restart the varnish cache server it solves the problem temporarily. After few hours same problem occurs. Please help me with some suggestion what I can do.

Thank you in advance.

Anava

I have the same Issue, and I pay for CWP Pro Manage support  :-[

pipoy


webaits

I'm having the same issue and no instruction is provided to tackle such issues.
The community version was working fine and Pro started giving the said trouble.
All site hosted on the server is giving Too many redirects issue. Hence no site-specific .htaccess issue.


Been two days and no success yet.
Thinking to surrender the Pro license.

rcschaff

Google Hangouts:  rcschaff82@gmail.com

webaits

rcschaff

I tried that without success.
The domain in question is https://www.oyari.com.

Also, this issue happens to only the homepage.
All subsequent page requests like (https://www.oyari.com/social) are served successfully.
Already tried different protocols and a little alternation like this:

if (beresp.http.Location == "http://" + bereq.http.host) {
if (bereq.retries > 2) {
unset beresp.http.Location;
#set beresp.http.X-Restarts = bereq.retries;
} else {
return (retry);
}
}
}


rcschaff

#6
Did you try this in your wp-config.php

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
   $_SERVER['HTTPS'] = 'on';
}

if ( !isset( $_SERVER['HTTPS'] ) ) {
    $_SERVER['HTTPS'] = 'on';
}


Don't forget to purge the cache after making any changes.
Google Hangouts:  rcschaff82@gmail.com

webaits

rcschaff,

Thank you for the time and perspective solutions.

Not all websites on the server are using WordPress.

The issue was with Varnish's cache.
I was using CWP's community version before and upgraded to Pro.
Then I utilized Varnish with the default configuration.

It is the very first time that any SSL certificate was updated by CWP, post buying the Pro.
And I guess it was the issue. Through it shouldn't happen.

I just flushed out Varnish's cache and it worked.
I'm not sure what would happen on the next SSL renewal of any domain but it is working temporarily.

Thank