On September 2017, the redhat cloud I used to host my wordpress site changed its structure (and pricing). I didn’t like that and moved to AWS.
This is how this website was deployed
There are lots of tutorial that explained everything (but for solving some critical problem explained below):
- account creation signup, create an IAM account and follow all steps (vpc, security group)
- Launch an instance deploy your first AWS instance. I used the free tier t2.micro with standard EBS volume.
- Connect to instance
- Install the LAMP stack follow all steps (install pck, start apache+config, secure mysql, …)
- Here I probably made a mistake when changing the owner of some directories :-\
- Install WP
It all worked fine, but I later had some trouble. My site wasn’t answering anymore and I couldn’t connect with ssh, timeout. I now think that I must have made an error with the credential. But at the time I didn’t know and, following some advice found on internet, I restarted my instance: I still couldn’t connect, but this time with connection refused…
After looking at the console log of my instance, I found out that ssh didn’t start, due to some incorrect owner rights on some system directories. But how to correct some file-system ownership when I cannot connect to the instance !?!
The solution, in short :
- Shutdown the instance
- Disconnect the EBS volume
- Create a new instance (same config) and connect the EBS of the 1st instance on it
- Start and connect to it.
- Correct the files owner ship on the mounted drive
- Revert the three first steps