enter image description here After enable https, magento store works as expected but magento admin dashboard gives this error.


Thank you @Harsha Liyadipita. this answer worked for me!



Problem Solved !

I have tried many solutions, but none of them work. Finally, I figured out a successful solution.

Step one,

Check your proxy server configuration, In my scenario I used nginx as proxy server.

server {
    server_name demoo.magento.xyz; ##replace your domain 

    location / {
            proxy_pass; ##replce your local address and port
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-Port 443;

listen 443 ssl http2;
##Do not add these lines, below lines will add after Obtaining an SSL Certificate##
ssl_certificate /xxx.pem;
ssl_certificate_key /xxx.pem;
include /path_to/options-ssl-nginx.conf;
ssl_dhparam /path_to/ssl-dhparams.pem;


Step two,

Check your config in db table called core_config_data. usel below command in sql cli.

select * from core_congif_data; and data should be like this,

  • web/seo/use_rewrites -> 1
  • web/unsecure/base_url -> http://demoo.magento.xyz/ ##replace your address
  • web/unsecure/base_link_url -> http://demoo.magento.xyz/
  • web/secure/base_url -> https://demoo.magento.xyz/
  • web/secure/base_link_url - https://demoo.magento.xyz/
  • web/secure/use_in_frontend -> 1
  • web/secure/use_in_adminhtml -> 1
  • web/cookie/cookie_domain -> null
  • web/cookie/cookie_httponly -> null
  • web/cookie/cookie_path -> null
  • web/secure/base_static_url -> null
  • web/secure/base_media_url -> null
  • web/secure/enable_hsts -> 0
  • web/secure/enable_upgrade_insecure -> 0

Final step,

  • Clean cache php bin/magento cache:clean

  • Setup upgrade bin/magento setup:upgrade

  • deploy static files bin/magento setup:static-content:deploy

  • Clear browser cache

Congratulations! Now your admin should work properly.

  • please consider marking your answer as solution to your question so others can see it too. cheers! – Diana Botean Feb 24 at 9:41
  • @DianaBotean updated! thankyou. – Harsha Liyadipita Feb 24 at 10:28
  • can you also mark your answer as accepted solution? – Diana Botean Feb 24 at 10:37
  • @DianaBotean yes, I can suggest this is an "accepted solution" ,but i don't have any privilege to mark it. thank you. – Harsha Liyadipita Feb 24 at 11:50
  • oh ok, sorry about that :) – Diana Botean Feb 24 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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