Control Web Panel

WebPanel => PHP Selector => Topic started by: Tunis0101 on March 07, 2021, 08:11:23 PM

Title: Err_too_many_redirects on WordPress /wp-admin/
Post by: Tunis0101 on March 07, 2021, 08:11:23 PM
I used to have a free cwp with apache-only webserver and everything was working perfectly except that its performance was terrible.
So I bought cwp pro to use php-fpm selector but now when I try to login as admin in my WordPress site it shows too many redirects error.
Here's everything I've done:
1.Build php8.0.2 from php-fpm selector and activate it.
2.Edit htaccess on my domain to use that build.
3.change webserver from apache only to Apache+nginx+varnish
4. Rebuild webserver

Homepage and site is working on http and https but on https it's not showing the green padlock on chrome browser.
I've tried removing ssl certificate and reinstall but it didn't work, I've also tried purging cloudflare cache and removing device cookies, I've also turned off force https on cloudflare.
Title: Re: Err_too_many_redirects on WordPress /wp-admin/
Post by: Sandeep on March 08, 2021, 03:31:16 PM
try this htaccess rule:

Code: [Select]
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

remove any https redirect before adding,
Title: Re: Err_too_many_redirects on WordPress /wp-admin/
Post by: Tunis0101 on March 08, 2021, 04:52:43 PM
try this htaccess rule:

Code: [Select]
SetEnvIf X-Forwarded-Proto "https" HTTPS=on
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

remove any https redirect before adding,

This fixed the admin panel but now the site is havinixed content because it is served through site.com/wp-content/cache/site.gzip

I turned off gzip compression in nginx.conf and the site is working fine, is there a way to use gzip without this happening?