I have install magento2 in AWS ec2 behind a load balancer . But when i try to access to login admin page i have error too many redirection
The problem is all solution i have fine not work .
I try all of this
php bin/magento config:set web/secure/use_in_adminhtml 1
php bin/magento config:set web/secure/use_in_frontend 1
php bin/magento config:set web/cookie/cookie_httponly 0
i try to put web/unsecure/base_url
with a https
web/unsecure/base_url = https://example.com
i try too remove and add my domain name in this variable
web/cookie/cookie_domain NULL
web/cookie/cookie_domain https://example.com
i try to put this in my .htaccess
SetEnv X-Forwarded-Proto=https
SetEnv HTTPS=on
or
SetEnvIf X-Forwarded-Proto https HTTPS=on
i try too add on the index.php
$_SERVER['HTTPS']='on';
but i don't have mage::run
my index.php finish with this
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);
my core_config_data look like this
0,web/cookie/cookie_httponly,0
0,web/secure/base_link_url,https://example.com
0,web/secure/base_url,https://example.com
0,web/secure/use_in_adminhtml,1
0,web/secure/use_in_frontend,1
0,web/seo/use_rewrites,1
0,web/unsecure/base_url,http://example.com