0

Ok so first of all sorry for a rather poor title, I'll try to make up for it in the description. Secondly, bear in mind I am no sysadmin and I'm a complete noob.
So here's the story: I just setup an EC2 amazon cloud, installed there one of the Ubuntu (10.10 32bit) AMIs, postgresql and java. Then I started tomcat and my j2ee application. All works fine and dandy but the only way I can access my webapp through the browser is by typing in:

http://ec2-XXX-XXX-XXX-XXX.eu-west-1.compute.amazonaws.com:8080/

And I'd want to be able to do something like:

http://myCustomDomainName.com

And then I'd be forwarded to my webapp in the cloud. Where should I look for that? In tomcat xmls? Somewhere in the amazon ec2 configuration?

Zenzen
  • 137
  • 1
  • 8
  • I'm not too sure either, but this definitely wont be Tomcat. You need a DNS mapping from your customdomainname.com to the EC2 DNS. See http://serverfault.com/questions/117413/setup-domain-with-amazon-ec2 and http://blog.codesta.com/codesta_weblog/2008/02/amazon-ec2---wh.html – JoseK Nov 09 '10 at 13:30
  • 1
    and you have to make tomcat bind on port 80 – J-16 SDiZ Nov 09 '10 at 13:40
  • so I can't tell my DNS provider to bind my domain name to XXX.XXX.XXX.XXX:8080? It has to be an address with no port only the IP? Can't I then setup Apache so it would redirect it somehow to port 8080 as I'm having problems rebinding my application from 8080 to 80 dunno why. – Zenzen Nov 10 '10 at 11:14

1 Answers1

2

A few words in advance:

Since you are (a selftitled) noob I will just outline the needed steps, since answering all of this in detail would be beyond the scope of this question (and way to much to remember and understand). So I hope I can get you started in asking further questions from here.

DNS

Assuming you already own mycustomdomainname.com you will need to map it to the Amazon EC2 instance you are using. This requires, that either your provider allows you to control the DNS settings of your IP in detail (in this setup you will need an Elastic IP), or that you've setup your own nameserver.

With Elastic IP

With elastic IP you could setup either your own Nameserver (or the one provided by your provider) to resolve mycustomdomain.com to your EC2 Instance.

Without Elastic IP

Without Elastic IP you will be required to periodically check the IP Adress of the Server (which can be queried via a Webservice) and update your own nameserver according to this IP.

Summary

Both setups I lined out would require that you'd read up on DNS. So this would be the first starting point. Both setups are not very complicated to achieve, so it would be a good idea to check with us if you see the questionmarks forming.

pacey
  • 3,833
  • 1
  • 16
  • 31