0

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

1

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.

0

The easiest way to do this is to add each asp.net website as an "Application" on the the same website. Run up IIS Manager (inetmgr), right-click on the website and select "Add Application". You'll be prompted to fill in all the standard info like you would a website (App Pool, path, security context, etc). The important part is the "Alias" - whatever you type here becomes the "b" in "domain.com/b". The only catch about doing this is that you will need to ensure your website has been coded to assume current-path-relative references to files. So, when the HTML makes reference to your JS, CSS and images, they're all href="images/logo.png" instead of root-path-relative, being href="/images/logo.png" - this is because you're not hosting the website in the root path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.