Hosting multiple websites on Amazon Ec2 using IIS is simple, all you need to do is add a firewall inbound rule, edit the site binding in IIS, add a custom TCP rule in the ec2 security group to support the port you are going to be using.
For example, you have two websites, one is the web app and the other is the Web API, and you need to use the same IIS server, the first thing to do is:
1) Add a custom TCP Rule in the ec2 dashboard under NETWORK & SECURITY tab and set the port to 81
2) Configure open IIS and create the two websites, after creating the websites,
you edit the binding for the two websites using port 81 on the API and port 80 on the web app.
3) Add a firewall inbound rule to support access from port 81
For a full-detailed information, check this out
Top comments (1)
The challenge in this case is if the second is a website, users will not enter :81 and you cannot advertise your site on websites/business card/boards as secondsite.com:81. How can I have two sites of different domain on same EC2 instance? For e.g. T1.com and A1.com