Skip to content

Setting up multiple websites and hostheaders in IIS

January 16, 2012

Problem: We have a test enviroment sonsisting of 2 websites. We need to set them up whithin IIS on the same server and navigate to them for testing purposes. Multiple websites can be setup on the same IIS by using:

a) Multiple IP addresses

b) Multiple ports

c) Host headers.

We will set up this environment using the host headers.

Solution:

– Add websites to IIS

– open the fisrt website in IIS and click on the bindings link in the actions menu

– enter the address the users will enter to access this test website from the LOCAL machine (www.jvdriver.com)

– open the second website in the IIS and enter the address for the second website (www.jvdriver.net)

– open the hosts file for the local machine and add the following lines into it:

127.0.0.1     http://www.jvdriver.net
127.0.0.1     http://www.jvdriver.com

Now when the user types either address into the browsers address bar the hosts file will redirect the request to the local machine’s IIS and the IIS will open the appropriate website looking at the host headers.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: