<div dir="auto">Hi, normally when I get infinite loop with ssl, its usually because of redirection of http to https. Sometimes front proxy (cloudflare or haproxy) is expecting simple http traffic and it gets https traffic and vice versa.<div dir="auto">Also check your wordpress settings and its url. Try changing it.</div><div dir="auto">And why are you using so much stuff just for wordpress? Simple nginx, php-fpm, fcgi cache works for me. And rate limiting works in nginx too. Try simplifying the setup so there are less variables to deal with.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Feb 2021, 10:16 PM Rainer Duffner, <<a href="mailto:rainer@ultra-secure.de">rainer@ultra-secure.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have an interesting problem.<br>
<br>
I have apache behind Nginx behind haproxy.<br>
<br>
SSL is terminated with haproxy (because haproxy can load all certificates from a single directory, and because some rate-limiting stuff is easier with haproxy).<br>
This makes using Let’s Encrypt easier.<br>
<br>
Sometimes, I want to do Nginx + fastcgi + php-fpm directly, without apache (it’s measurably faster).<br>
<br>
For apache, you need this in the configuration:<br>
<br>
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;<br>
<br>
(and for good measure, also this:<br>
SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on<br>
)<br>
<br>
For fast-cgi, one also needs this in the configuration (fastcgi_params):<br>
<br>
fastcgi_param HTTPS $fwd_ssl;<br>
<br>
<br>
$fwd_ssl is generated by this map:<br>
<br>
map $http_x_forwarded_proto $fwd_ssl {<br>
http off;<br>
https on;<br>
}<br>
<br>
in the global http section.<br>
<br>
In wordpress, when I enable „Really Simple SSL“, I get a redirect loop (to https) on the front-page (as an unauthenticated user) but the backend works.<br>
<br>
I wonder what wordpress is missing so that it still thinks the connection is coming over http instead of https.<br>
<br>
<br>
<br>
Any ideas?<br>
<br>
Best Regards<br>
Rainer<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank" rel="noreferrer">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div>