I'm using an Ubuntu / NGINX server configuration. Followed the directions found here: https://www.rosehosting.com/blog/magento-2-with-redis-varnish-and-nginx-as-ssl-termination/

I installed the SSL and confirmed its working. Secure URLs are set to https, unsecure are set to http in the backend.

When you access the site over http, it works fine. If you try to access it over https, all resources load http. You cant access the backend or cart / checkout as it causes a redirection loop.

I removed the varnish configuration and the website was working fine over https, leading me to believe there is something wrong with my varnish configuration.

See the site here: https://www.quantumstoragesystems.com/

Anyone have any idea what I'm doing wrong here? Any help would be appreciated.

  • Thanks for the link, I found the solution there! I will add it as an answer here
    – Jeremy F.
    Apr 6, 2018 at 15:27

1 Answer 1


Thanks to MagenX I found the solution!

Find the line like this in nginx.config: location ~ (index|get|static|report|404|503|health_check|phpinfo).php$ { .... }

Add this line: fastcgi_param HTTPS on; above: include fastcgi_params;

Restart NGINX! Worked for me!

  • dont forget to set full https, unsecure_base_url to https:// too
    – MagenX
    Apr 6, 2018 at 18:06
  • This post is must! You saved me hours guys.Thanks!!!
    – G. G.
    Apr 18, 2019 at 18:25
  • Thank you alot you saved my life
    – Ajay Jain
    Nov 10, 2021 at 1:34

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