cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.1 Varnish and Nginx Redirect Loop / Content HTTP

Magento 2.2.1 Varnish and Nginx Redirect Loop / Content HTTP

Hi,

 

Currently having an issue configuring Varnish 4 with Magento 2.2.1 with SSL

 

If we include

web_unsecure base URL:  http://example.com

web_secure base URL:  https://example.com

When Varnish is active all static content is loaded over HTTP rather than HTTPS and page does not load correctly

 

If we include

web_unsecure base URL:  https://example.com

web_secure base URL:  https://example.com

We get redirect loop error message on browser

 

We have included fastcgi_param  HTTPS on; in our Nginx conf below and still no luck

 

# PHP entry point for main application
location ~ (index|get|static|report|404|503)\.php$ {

	try_files $uri =404;
	fastcgi_param  HTTPS on;
	fastcgi_buffers 1024 4k;

If anyone anyone could point us in the right direction would be hugely appreciated

 

Thanks

 

 

2 REPLIES 2

Re: Magento 2.2.1 Varnish and Nginx Redirect Loop / Content HTTP

Did you ever figure out this issue? We have the same issue but are running Magento 2.3.3.

Re: Magento 2.2.1 Varnish and Nginx Redirect Loop / Content HTTP

same issue on 2.4.0 varnish on, over http everything is fine, over https redirect loop. When we change web base url in databse to without https like this "//example.com" it does work, but break for example $this->url(); (native magento method btw) 

 

Any fix for that?