Run multiple sites from one IP in IIS

I have a box with Windows Server 2008 and IIS 7, and I’m using an ASP.NET app.
I am trying to run multiple sites from one IP, but I can’t access the sites from the outside. I can only access the Default website from outside but when I want to access the second one it does not work.

The second one should run on the http://ip:81 and the default one is on 80.
They both run fine locally on the box and I have added a rule on the firewall to allow all inbound.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

You can use the same port 80 for all the sites. It’s all about the bindings. You need to bind each site to a different host name:

www.domain.com
site2.domain.com
www.anotherdomain.com

etc.

You can do this by specifying the binding when creating a site. Then make sure you have configured DNS records to point at the same IP.

You can also setup a catchall DNS entry for a domain and point it at the IP of the server, then every time you create a site you can simply pick a new subdomain name at it will work straight away.

Method 2

host headers are your friend

This link might help you.

http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx

You basically are going to run your sites on different ports and the tell IIS that http:// url1 maps to the site on port 80 and http:// url2 maps to port 81

Method 3

A TCP port number, an IP address, a host header these three are used to identify incoming http call processing and since first two is common now only you need to use host header which easily possible to done by command prompt and also with user interface of IIS.

Please read this post here to know whole process step by step


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x