We hope someone can point us to a new direction as we're at our wits end on this.
We installed Magento 2.2.2 CE when it first came out and hired a system engineer to set up Varnish for the server to work with Magento. Once Varnish starts, all https pages has an redirect loop error.
Since then, we have been trying to fix this issue without any solutions.(including hiring Magento certified people to take a look). The person who originally set up the Varnish has look into the matter and said that the settings for Vanish are correct and that the issue must be on Magento settings.
We've tried everything we've seen suggested online.
adding SetEnvIf X-Forwarded-Proto "https" HTTPS=on to .htaccess
trying all possible combination of settings for web/secure/use_in_frontend, web/secure/use_in_adminhtml, web/secure/enable_hsts, web/cookie/cookie_domain(between null and actual web url), web/secure/enable_upgrade_insecure and adding https to web/unsecure/base_url
We've also tried all possible combination of settings along with adding the SetEnvIf code.
We've cleared cache and cookie and tried different browser on every test attempt.
The only time we saw any change in our testing result was turning "Auto-redirect to Base URL" to No. With that setting and Varnish being on, https will work for the frontend but going to the custom admin url results in a 404 not found error.
We've been at this for so long that 2.2.3 is now out and we've not gain much on this issue. Any suggestions or insight is greatly welcomed.
Thanks for taking the time to reply and help.
Unfortunately your suggestion did not solve our issue.
We double checked again for all "web" in database and it is correct with https and both use secure url for frontend and backend is yes.
We uploaded the default .htaccess file from Magento and retested but issue is still the same.