Ubuntu – Link a domain to a Amazon EC2 instance

amazon ec2domaindomain-name-systemUbuntuweb-server

  • I just installed an instance with Ubuntu 10.10 x32, micro (free tier), LAMP. It works!
  • I have an elastic ip for my instance, assume: a.b.c.d (also works)
  • I can see my Public DNS: ec2-x-x-x-x.compute-x.amazonaws.com (also works)
  • and my Private DNS and a Private IP
  • I can ssh into my instance
  • I bought a domain, I'm in the Control Panel
  • Here are the option in the control panel: Host Name – IP Address/URL – Record Type (URL Redirect, URL Frame, A, CNAME, TXT Record, URL Redirect 301, AAAA IPv6, NS Record, SRV Record) – MX PREF – TTL

I'm lost, what should I do now?

Goal:

  • Type my domain.com/page.php and display the data on /var/www/page.php on my amazon ec2 instance

Best Answer

You'll need to add an A record in your domain registrar's DNS control panel and point it to the elastic IP address you purchased from Amazon.

That'll get the domain to the server. Note, there will be some propagation involved as with any DNS change, so you may not see your results right away.

The @ stands for your domain, ie getbunch.com.

Set both the @ and the www IP address fields to your elastic IP.