Prepare a LAMP web development server on Amazon EC2

Here is a quick checklist for setting up LAMP development server on Amazon EC2. I used a standard Amazon Linux AMI on a T2.micro instance, which costs about $9/month at the time of writing this.

  1. Edit the DNS zone for your domain to add an A record for a sub-domain to point to the public IP of the instance. I recommend setting the TTL to 60 for fastest updates of IP later if necessary.
  2. Use putty or ssh to log in to the instance.
  3. Follow the instructions at https://gist.github.com/aronwoost/1105007
  4. Test the server by visiting it on your browser using either the public IP or the url.
  5. Prepare web directory: A useful guide for permissions. The Apache user is “apache”, member of group “apache”.
  6. Prepare HTTPS: for Amazon Linux, this is already set up … but for more info, see http://wiki.centos.org/HowTos/Https
  7. Install Codiad (an online code editor/IDE — this enables you to write your code anywhere rather than being bound to your workstation and your desk):
  8. Browse to servername/edit to set up Codiad. Once done, it’s now ready to use. from that same location.

Tip: need to set up multiple virtual hosts on the server? Amazon Linux is based on CentOS. Here is a step-by-step guide on setting up virtual hosts on CentOS. A similar guide for SSL virtual hosts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you a human? Answer this simple question to prove it! * Time limit is exhausted. Please reload CAPTCHA.