I have a virtual machine in azure running three self hosted applications (not hosted in IIS) on three different ports.
I can access them at the urls below:
my-server.cloudapp.azure.com:8080
my-server.cloudapp.azure.com:8081
my-server.cloudapp.azure.com:8082
I've purchased a domain name (my-server.company.com
) and want to create three subdomains pointing to each respective applications
application-1.my-server.company.com
application-2.my-server.company.com
application-3.my-server.company.com
My first thought is to install IIS on the virtual machine and setup a reverse proxy using URL Rewrite on the default website as mentioned in this article (http://weblogs.asp.net/owscott/creating-a-reverse-proxy-with-url-rewrite-for-iis).
So in this scenario, I would setup CNAME records for each of the sub-domains to point to my-server.cloudapp.azure.com
and then configure the reverse proxy to forward to the different ports (8080
, 8081
, 8082
) based on the host header.
Is this possible / the best way to go about this?
The second question is once I get this working, how can I add ssl?
Would each sub-domain need its own ssl certificate, in which case how can this work with the setup above (there are no iis websites to bind each certificate to). Or could I just use a certificate for my-server.company.com and then offload at the reverse proxy?