2

When I am installing Magento under a subdomain of my production domain, I cannot login to magento admin. For example, my domain name is example.com where I have installed magento and it is in production, I am ok with admin login.

However, I have a subdomain called test.example.com and I installed magento there for testing purpose. Now, if I try to login to the test site, I can't login. The username and passwords are correct. I see no error message. It just reloads the same login page. Same things happens when I try to login to my production site admin panel.

If I clear the cookies related to example.com and test.example.com and then try to login to the admin panel of example.com, I am fine. Now, when I try to login to test.example.com admin panel, the problem starts again. Below is the current configuration

This is the current configuration

Is there anybody who can help me solving this issue?

1
  • Try to change the Cookie domain for both Commented Jul 27, 2015 at 12:17

1 Answer 1

1

Finally I have solved the problem by putting the cookie domain value to www.example.com to production and test.example.com to my test site from Session Cookie management from the admin. Although this solution will not allow users to login without www i.e. example.com/admin will not work. We will have to use www.example.com/admin for successfully login to magento admin

2
  • I would have loved an actual answer that does not rely on "www." being present for real life use :/
    – DM8
    Commented Feb 22, 2018 at 12:16
  • ... (continued) however I found out that's not possible due to cookie's domain inheritence per RFC 6265
    – DM8
    Commented Feb 22, 2018 at 12:24

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.