user984621
user984621

Reputation: 48443

How to set up custom domain for an app on Amazon EC2?

I am new in the Amazon EC2 world, I just created an app, that is located URL like this:

http://ec2-54-123-45-678.compute-1.amazonaws.com:8080

This is generated URL by Amazon EC2.

Now I would need to use my own domain name, so when I would access www.my-domain-name.com, I would like to see the content from

http://ec2-54-123-45-678.compute-1.amazonaws.com:8080

I bought the domain name on Godaddy. Is there any way to do this in Amazon AWS dashboard or do I need to set it up in Godaddy system?

Thanks

Upvotes: 30

Views: 17710

Answers (3)

JGallardo
JGallardo

Reputation: 11373

I am answering on a more general level because I stumbled upon this thread when setting my custom domain.

In Amazon I created an instance and associated an IP to that instance. You were able to access it by typing in the amazon url

main

I actually used Media Temple not GoDaddy, but it will be similar. I went to the zone file and added that public url to the www

zone file

And as you can see, here is my blog actually working on the custom domain.

custom domain

I set the wildcard because that way, no matter what someone types, if it is not set, then they will still see the site.

enter image description here

EDIT

For the root URL you should be entering your elastic IP and setting that as an A record.

Upvotes: 19

satish john
satish john

Reputation: 226

In order to setup DNS mapping you can map the existing IP 54.123.45.678 to ex: www.my-domain-name.com.

However, as you are running tomcat which is running at 8080 you need to forward the the request to the tomcat using Apache. So that you can visit www.my-domain-name.com without port 8080. If you are using linux box install Apache, apache-modjk and then configure sites.

Upvotes: 0

First you need to set an ElasticIP for associated to that instance.

Then point the DNS entry of "www" for "my-domain-name.com" to the IP assigned in the step above.

Where you manage your DNS is another thing, can be in GoDaddy or in AWS Route53. You must adjust the delegation DNS in the "my-domain-name.com" register. Ex: your domain can be registered with GoDaddy but its delegation DNS point to Route53 so you can manage the domain from your AWS Console.

Upvotes: 9

Related Questions