5

I'm trying to enable our ssl certificate on wijnmaat.nl it is working for the frontend but the backend is giving us an error:

ERR_TO_MANY_REDIRECTS

This is when I try to reach the backend trough https://www.wijnmaat.nl/admin. this is when ssl is enabled in the config in the backend & frontend and when it is off. Can somebody please help us with this?

We also checked and edited the secure base url to https://www.wijnmaat.nl

thanks,

Brent

1
  • .. found my solution. Will add an answer
    – Michel Tol
    Commented Nov 16, 2017 at 11:06

4 Answers 4

4

Based on the this article I was able to resolve it.

Check if the entry already exists.

select * from  core_config_data  where path = 'web/secure/use_in_adminhtml';

If not insert the following entry in the DB

INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/secure/use_in_adminhtml',1);

else update the value and set it to 1

After inserting / updating the record clean the cache via the CLI : php bin/magento cache:clean

3

I inserted the suggested SQL and I also had to add the following to nginx.

SQL

INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/secure/use_in_adminhtml',1);

nginx

fastcgi_param  HTTPS "on";
fastcgi_param  HTTP_X_FORWARDED_PROTO "https";

Which I got from here, https://github.com/magento/magento2/issues/9424

1

Enable HTTPS for admin from Stores > Settings > Configuration > General > Web. Add this code below in your .htacces file:

SetEnvIf X-Forwarded-Proto https HTTPS=on
SetEnvIf HTTPS On HTTPS=on
RewriteCond %{HTTP:X-FORWARDED-PROTO} !https 
RewriteRule ^(.*)$ https://www.wijnmaat.nl/admin/$1 [R=301,L]

Clear all cache, deploy static content, enable 777 to pub and var directory.

1
  • Hi Pankaj, Thanks for helping out! Unfortunately. This didn't work But we enabled both HTTPS for frontend and backend and it worked. But we are not able to click on the menu on the left side. Nothing happens. Do you also know how to fix this? Thanks. Brent Commented Mar 3, 2017 at 9:09
0

have you checked all settings properly?

Go then to Stores>Configuration from the admin panel unfold the Base URLs (Secure) section Updating base URL http to https. Yes for Use Secure URLs on Storefront select Yes in using the Secure URLs on Storefront. now its done with HTTPS.

Source - https://www.sparxbpo.com/blog/enable-ssl-magento-2-store.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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