Say, I host my website on Amazon ec2 server, and Amazon gave a public url: http://ec2-54-214-21-47.us-west-2.compute.amazonaws.com/drupal-7.22/
So how can I map my own domain name (say www.example.com ) to this website?
Just following the following steps:
- Create an Elastic IP on the AWS Panel, then associate it to your instance. Note that when you turn off your instance for a long time, you need to re-associate your elastic ip to this instance.
- Go to your domain management system (Mine is Goddady). Add a A record to the DNS record pointing to the elastic IP address assigned in (1). Your domain provide should either give you some way to set the A record (the IP address), or it will give you a way to edit the nameservers of your domain.
If they do not allow you to set the A record directly, find a DNS management service like ZoneEdit, register your domain as a zone there and ZoneEdit will give you the nameservers to enter in the admin panel of your domain provider. You can then add the A record for the domain in ZoneEdit.
The basic service of ZoneEdit is free, you could also use Amazon route 53 or a similar pay-for service, if you preferred.
PS.
If you want to host multiple website on your server, read
Post a Comment