Skip to content

Instantly share code, notes, and snippets.

@jaywilliams
Last active June 7, 2018 16:09
Show Gist options
  • Save jaywilliams/6caae77d65ca69776a47 to your computer and use it in GitHub Desktop.
Save jaywilliams/6caae77d65ca69776a47 to your computer and use it in GitHub Desktop.
Magento 2 SSL Redirect Loop Fix (Apache + Varnish + Nginx)
# Add this to your the Magento .htaccess file located in your docroot
############################################
## Nginx proxy HTTPS Fix for Magento
## Source: https://www.sonassi.com/blog/magento-kb/magento-https-redirect-loop-2
SetEnvIf X-Forwarded-Proto https HTTPS=on
@jaywilliams
Copy link
Author

This fixes the "This webpage has a redirect loop" error.

@fatmarker
Copy link

Hot damn! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment