Update 4/1/17: For some reason the redirect of PHP does not happen anymore. I am not sure what caused problem the first time, if it was a caching issue, DNS propagation, I don't know. But now a few days later it's not happening anymore and the second site installation is OK. I just wanted to inform if anyone followed this before I will probably remove the post in a couple of days. Sorry for reporting a problem that now seems to not be a problem anymore. I don't have an explanation why it it's now suddenly working
I started using EE a couple of months ago and it has been extremely helpful. This weekend I was setting up a new Linux node (Ubuntu 16.04 LTS on Linode) to host a few websites, and ran into several problems. I have since learned that EE was updated and I believe these issues are related to bugs in the new release. Only a couple of weeks ago I used EE on an identical Linode setup (pretty sure) without any of these issues.
These are the installation lines I use to install two websites:
sudo ee site create site1.com --wp --php7 --wpredis –letsencrypt
sudo ee site create site2.com --wp --php7 --wpredis --letsencrypt
During the installation of the first website (site1.com) I only encountered one problem. This was the ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY issue discussed elsewhere in this forum, which I fixed.
When trying to install site2.com I ran into two additional problems, which I have not seen discussed on this forum.
Problem with Mysql root password:
When installing the second website, the EE script aborted with an error message indicating it had problems connecting to Mysql. I used the EE command to delete the site and tried installing it again, but the same error. After some debugging I discovered that the Mysql root password stored in /etc/mysql/conf.d/my.cnf did not work anymore. If I understand correctly, this password is set by EE when installing Mysql as part of the new installation for the first website. Why did this password suddenly stop working when installing the second website? After a lot of digging I was able the reset the root password and update my.cnf with the new password by following this guide:
Problem with PHP content redirecting site2.com to site1.com:
After fixing the myswl root password issue explained above, EE ran through and installed site2.com. However, when accessing the Wordpress new website on site2.com it gets immediately redirected to site1.com. This seems to happen for PHP content such as Wordpress. I placed a static text file, hello.txt in the web root directory of site2.com, and it shows fine without redirecting it. Is there something wrong with the setup of PHP that does not separate the two websites? As a result php content from the second website gets redirected to the website that was installed first? Is it related to the Mysql root login issue? Maybe the installation of the second website ignores the fact that another website has already been installed, and it does not honor the existing Mysql root password or does not separate PHP setup from the first website?
At this point I am only running one website, and cannot continue adding more websites until this has been solved. I so much want to move all my sites from Godaddy to Linode with EE ASAP. I am not an experienced Linux admin so at this point I am stuck. Any suggestion for what the issue might be with the PHP redirect is highly appreciated. If this is a known bug, detailed instructions for a workaround would be great and a quick fix in EE even better.