User stak shows us how to get a FEMP stack (FreeBSD, nginx, MySQL, PHP) set up on your Amazon EC2 cloud. Note that you will need an existing Amazon Web Services (AWS) account to set up your FreeBSD web stack. See the link below for the full set of instructions.

I recently migrated a bunch of stuff (including this website) to Amazon EC2, running on a FEMP (FreeBSD, nginx, MySQL, PHP) stack. I had to fiddle with a few things to get it running smoothly, and wanted to document the steps in case anybody else is trying to do this (or I need to do it again later). This assumes you have an Amazon AWS account and some familiarity with how to use it.

Before you start

Ensure you know what region and instance type you want. I used the Canada (Central) region but it should work the same in any other region. And I used a t2.micro instance type because I have a bunch of stuff running on the instance, but presumably you could use a t2.nano type if you wanted to go even lighter. Also, I’m using Amazon Route53 to handle the DNS, but if you have DNS managed separately that’s fine too.

Upload your SSH public key

In the EC2 dashboard, select “Key Pairs” under the “Network and Security” section in the left pane. Click on “Import Key pair” and provide the public half of your SSH keypair. This will get installed into the instance so that you can SSH in to the instance when it boots up.

Full tutorial: