Home Why am I getting a redirection loop from PHP built-in web server on AWS Cloud9?
Reply: 0

Why am I getting a redirection loop from PHP built-in web server on AWS Cloud9?

Tomasz Lisiecki
1#
Tomasz Lisiecki Published in 2017-12-06 10:19:54Z

This is my first attempt to migrate a project from Cloud9 to AWS Cloud9 since the clock is ticking.

I have created a brand new environment on AWS Cloud9, which is supposed to work out of the box. I've uploaded WordPress files and database, replaced URLs with my environment's preview URL (https://*.vfs.cloud9.eu-west-1.amazonaws.com), then ran the build with a PHP (built-in web server) runner.

Usually, that's all that is needed to migrate a WordPress website but this time I am stuck in a redirection loop whenever I try to preview the site.

My findings so far are that it's all down to forced SSL by AWS Cloud9. They specifically said they won't allow for any environment to work over a non-secure connection.

When I set the home_url in the options table to "http://...", then the loop breaks and the site appears. Of course, assets don't load because of the insecure connection. However, when I switch back to https in the home_url value, I am back in the loop...

No matter what I put in .htaccess, it doesn't help. I can't even find where to config Apache as the default /etc/httpd/conf.d/httpd.conf refers to /var/www directory, where as AWS C9's default workspace dir is /home/ec2-user/environment.

Below is a screenshot of my console while it's stuck in the loop. It does numerous connection to itself (duh..) and finally terminates.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.395889 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO