I did install a SSL certificate in our production environment, but the problem is than some images and javascript files are loaded by http (Mixed content).

Our architecture is:

  1. SSL (nginx) listen on port 443
  2. Varnish listen on port 80
  3. Magento (apache) listen on port 8080

Routing is in the follow order:

  1. SSL server
  2. Varnish
  3. Magento

Note: All the servers are virtual servers.

I changed in Magento Settings the Secure Base Url to https://www.ourdomain.com

Thanks in advance!

  • Search your codebase for http:// as there could be hard-coded urls. Nov 6, 2017 at 17:43

2 Answers 2


Please make secure and unsecure base urls to https://www.ourdomain.com

Also Go to Store->Configuration->General->Web and set Use Secure URLs on Storefront = Yes.

This will resolve your mixed content problem.


In addition to making sure that your content (Product descriptions, Pages, etc) do not have any hardcoded links to the http version, there is an option in the

Stores > Configuration > Web > Base URLS (Secure)

Make sure that both

Use Secure URLs on Storefront & Use Secure URLs in Admin are set to Yes.

You will have to clear your cache in Magento and purge Varnish (If Magento is not set up to do that automatically)

If all else fails, you could use the Nginx config to force a redirect of all insecure content to the secure version.

Not the answer you're looking for? Browse other questions tagged or ask your own question.