• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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