(1 of 4 Install Scala and Play on Ubuntu 12.10)
This guide goes over setting up an ELB with a multi-domain
SSL certificate. The servers attached to
the ELB will run multiple Play servers on different ports with an nginx server
running in front of them to handle routing based on domain/subdomain names.
I know that is quite a mouthful but here is what I am trying
to accomplish….
I want to run more than one Play Server on an ec2
instance. Each Play Server will run on
its own port. I want to have a domain
name to route to a specific Play server.
Ex. www.example.com routes to the
Play server running on port 9000 and
www2.example.com routes to the Play server running on port 8000. In addition I want all the communication to
be secure using ssl certificates.
For an individual server you could simply put a nginx server
in front of the Play servers and have the nginx handle routing based on domain
name. But, in this case I want to add an
AWS ELB (Elastic Load Balancer) in front of several EC2 machines.
Here is what I have found out thus far. The ELB can handle the ssl certificate, but
it can only have one certificate per ELB.
This forces you to use a multi-domain SSL certificate. Also the ELB cannot port forward based on
domain name so you still need an nginx server in front of the Play servers.
I want something like this.
The ELB handles the certificate and the nginx server handles the domain
name routing.