• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Varnish for HTTPS WordPress site in a Docker container

Pheonix Support

New Pleskian
Hello,

We've been mulling around issues while trying to setup varnish for https wordpress site in a docker container.

We've followed the link - https://www.plesk.com/blog/product-technology/varnish-wordpress-docker-container/

This article perfectly works with HTTP but not HTTPS. We always get "too many redirects or redirect loop error" once we enable ssl.

Anyone has successfully implemented varnish for HTTPS websites along with plesk,wordpress,docker,nginx ?

Thanks in advance
 
Hi,
Make sure that Wordpress is not redirecting to HTTPS, all communication through varnish is HTTP. All links in wordpres should be HTTPS (images, CSS, etc), otherwise you get mixed content which in Google Chrome is blocked.

We had a custom config in NGinx to redirect all HTTP traffic to HTTPS:
if ($scheme = "http") {
return 301 https://WEBSITE.COM$request_uri;
}

I know it is not the best solution, but we could not find a better one. The option "Permanent SEO-safe 301 redirect from HTTP to HTTPS" also creates a redirect for Apache wich creates the infinite redirect loop.

The current problem we face is that Docker is not stable, we suffered 2 times problems with Docker and we needed to click on recreate Docker image to make it work again. We did not find a way to get a fresh image running every morning.
 
Back
Top