Installing magento2



I try to install magento2 on c9. Therefore I updated mysql to 5.6 and cloned the magento/magento2 repo from github. Installation works fine but when I call the admin URL I get a message saying “you’re website has a redirect loop”.
Has anyone already successfully installed magento 2 on c9?


Can you preview the admin panel in a separate browser tab and see if that happens too?



sadly yes.
Somehow the redirect to /admin gives me /admin/admin/index/index/key/c9134e207ad558cda1279f2e36220666b6cdd19bf5392e5d9f3fc97871bc097c/

I double checked .htaccess and everything


If you’re seeing it on a new tab, it is probably a configuration issue of magento2. Maybe you can post this on StackOverflow, or wait for an answer from some of our members who’ve used magento 2 before.


To .htaccess add the two lines below:
SetEnvIf X-Forwarded-Proto https HTTPS=on



You just need to add the port to your store base url, the issue is caused by port forwarding on C9.
More details in the StackOverflow answer mentioned before in the conversation (sorry, it’s not letting me post the link as it says I’m posting two links and I’m not allowed to do that because I’m a new user).

Hope that helps!

Best Regards,


Yes, this is the perfect solution!

This problem troubled me for a month. I even thinking about changing my IDE vendor to Codeanywhere.

Please select Renato’s post as solution and let other Magneto developers never loop in this kind of infrastructure noise.

Again, thanks for Renato’s sharing. Push a LIKE for you!


Happy to help! :slight_smile:
Here is the StackOverflow post with some more infos:


I tried using the port with base URL,
like this but it didn’t work.
imageI got this message.

Then I ran these commands. and refreshed the admin login page.
php bin/magento cache:clean && php bin/magento cache:flush

Then it worked.