Author Topic: Error Too Many Redirects - Varnish Cache Issue  (Read 6188 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Error Too Many Redirects - Varnish Cache Issue
« on: March 17, 2021, 04:18:07 AM »
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.

Offline
*
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #1 on: May 05, 2021, 06:22:04 PM »
I have the same Issue, and I pay for CWP Pro Manage support  :-[

Offline
*
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #2 on: May 05, 2021, 11:05:48 PM »
I think this is an .htaccess issue.


Offline
*
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #3 on: March 12, 2022, 05:40:19 AM »
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.

Offline
****
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #4 on: March 12, 2022, 05:59:21 AM »
Please take a look at the following article:

https://saadhost.com/solved-err_too_many_redirects-varnishnginx/
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #5 on: March 12, 2022, 07:05:23 AM »
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:

Code: [Select]
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);
}
}
}

Offline
****
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #6 on: March 12, 2022, 07:16:15 AM »
Did you try this in your wp-config.php

Code: [Select]
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.
« Last Edit: March 12, 2022, 07:23:54 AM by rcschaff »
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Error Too Many Redirects - Varnish Cache Issue
« Reply #7 on: March 12, 2022, 09:10:28 AM »
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