Omnia shows you how to
host multiple websites
using a single EC2 instance

multiple-public-website-ec2-iis-omnia

I want to host multiple public websites on a single Amazon EC2 Windows Server instance. How can I do this?

You can configure this with Internet Information Services (IIS) using multiple host names on an EC2 Windows Server instance.

If you have more than one website, you can host them in IIS on the same EC2 Windows Server instance. IIS differentiates between websites by using bindings, which are a combination of the protocol type, IP address, port, and host name. To avoid IP and port conflicts, you will need to add a host name.

Note: If you haven't already done so, set up and configure your first website. For additional information, see How do I publicly host my website for EC2 Windows using IIS?

Add a host name using IIS Manager and update your local hosts file:

  1. Open IIS Manager, and in the Connections pane, choose the site that you want to add a host name to.
  2. In the Actions pane, choose Bindings, Edit, enter a name in the host name field, and then choose OK.
  3. Update the hosts file with the host name to access the website locally from the IIS server.
    1. Open Notepad or your favorite editor using the Run as Administrator option, and then open the hosts file in the C:\Windows\System32\drivers\etc directory.
    2. Enter the Private IP address of the EC2 instance and the host name of your website, and then save the file.
  4. Repeat steps 1-3 for each additional website.

You should now be able to host multiple websites on the same EC2 Windows Server instance.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.

Published: 2017-04-11