Iis – Map different paths to separate websites

iisiis-8.5

Running on IIS 8.5, I have 4 different sites running asp.net applications, let's say a:80, b:7777, c:8888 and d:9999 (all running on different ports)

Is there a way to have domain.com point to default web site a and the 3 other apps -> domain.com/a (point to a:7777), domain.com/b (point to b:8888) and domain.com/c (point to c:9999) and all 4 have separate app pools?

Thank you

Best Answer

Typically what you're asking for is achieved by using a Reverse Proxy in front of the sites. Some popular dedicated options include HAProxy and NGINX.

It also appears that IIS by itself can potentially do it with the URL Rewrite module. Here's a blog post with more info:

There are times when you need to reverse proxy through a server. The most common example is when you have an internal web server that isn’t exposed to the internet, and you have a public web server accessible to the internet. If you want to serve up traffic from the internal web server, you can do this through the public web server by creating a tunnel (aka reverse proxy).

Essentially, you can front the internal web server with a friendly URL, even hiding custom ports.

Related Topic