Iis – Several web applications on a single port

iisport

We're developing an online browser-based game. The game itself is a plugin in the web page, that uses TCP connection to a game server, and also sends http requests to "content server" web application.

This makes 3 servers total: the site itself, game server and content server. Site and content server are IIS web applications, game server is a custom application communicating over TCP with proprietary protocol.

While the game is in beta stage, all these servers are physically hosted on a single machine, and distinguished by ports. For example, website is game.example.com:80, game server is game.example.com:34285 and content server is game.example.com:50000.
This works OK most of the time, but some of our players have ports other than 80 closed.

Is there any way to make all these application work through port 80, while still having them one one physical server? Maybe using different sub-domains? There's probably a way to make IIS forward requests to different web applications based on URL alone, but that doesn't help with game server.

Edit Server is Windows Server 2008, IIS 7

Best Answer

My suggestion would be to utilized multiple IP addresses. You can host multiple IPs on the same physical box, with different applications bound to the same port on each IP. Thus, 192.168.13.4 could be the web server, 192.168.13.6 could be the content server, and 192.168.13.9 could be the game server. Each could communicate over whichever port(s) are needed, and all run on port 80, if desired.

Using sub-domains, host headers, and such are all going to happen at the application level, and won't work for the game server (as you mentioned).