I am building a few web sites in ASP.NET Core (multiple user interface applications and a WebAPI app). They all work together, utilising the WebAPI. For the purpose of my question we'll call them App1, App2 and App3. I am hosting my websites in IIS.
Typically, in the old .NET Framework (4.5.1), I would have one website in IIS, with multiple web apps to host my multiple applications. Like so:
- WebSite1 - running on port 443
App1
App2
App3
If the website (WebSite1) runs on port 443 (using the SSL cert), that means all apps are accessible via one domain url as follows:
With different app names at the end of the URL to identify them.
When hosting the new ASP.NET Core applications, I host in IIS as well, and following the documentation for ASP.NET Core web site deployment, I host each .NET Core web app in a different site within IIS.
As I have one domain name for all my sites, for example, https://www.example.com (I'm using an SSL cert), I have to give the other websites different ports. So I end up with something like this:
WebSite1 - running on port 443
WebSite2 - running on port 444
WebSite3 - running on port 445
All of these apps are then accessible via these domain name URLs:
How do I host ASP.NET Core applications all under one website as different "Applications", meaning they resolve to the same domain name (https://www.example.com and the forward slash app name identifies which app we want)? OR alternatively, how do I take what I have configured now with the ports and route them all so App1 is default for example.com/, App 2 is example.com/app2/, and App 3 is example.com/app3/?
Am I looking at this .NET Core deployment completely the wrong way?