Author Topic: Nginx, Varnish, Apache + WordPress SSL  (Read 1625 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Nginx, Varnish, Apache + WordPress SSL
« on: December 28, 2022, 09:34:19 PM »
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.

Offline
*****
Re: Nginx, Varnish, Apache + WordPress SSL
« Reply #1 on: March 11, 2023, 04:52:03 PM »
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/