Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: digitalmango 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.
-
I have the same Issue, and I pay for CWP Pro Manage support :-[
-
I think this is an .htaccess issue.
-
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.
-
Please take a look at the following article:
https://saadhost.com/solved-err_too_many_redirects-varnishnginx/
-
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);
}
}
}
-
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.
-
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
-
check this wiki :
https://wiki.centos-webpanel.com/nginx-proxy-err_too_many_redirects
more rules :
https://www.mysterydata.com/apache-http-to-https-htaccess-redirect-on-cwp-centos-webpanel/