New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSCache and CWP CageFS at no extra cost with all CWPpro licences. The LSCache plugin is integrated into our WordPress and other script installers, and CWP CageFS gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Nginx, Varnish, Apache + WordPress SSL

Started by zorio, December 28, 2022, 09:34:19 PM

Previous topic - Next topic

zorio

Hello. Can someone share the configuration for configuring WordPress SSL for Nginx + Varnish + Apache?
No site with such settings works. I get an error: Many Redirects Loop if I add to wp-config.php string: $_SERVER['HTTPS']='on';
Then all pages work except wp-admin. When logging in, I get the error: Sorry, you are not allowed to access this page.
On Apache - all work.
P.S. I'm using CloudFlare.

overseer

I'll just say that's a complex chain to troubleshoot. Cloudflare is easy to bypass in Developer mode for testing, so you can remove it temporarily while troubleshooting. I would consider omitting either Nginx or Varnish out of the chain, unless you really, really need to milk every last drop of performance out of your server. But if that's the case, it's probably a better proposition to upgrade your service or hardware. You could also drop Apache and just have Nginx as your HTTP server for better performance. I have WP sites running under Nginx just fine, very performant.

https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/