Running multiple ASP.NET Core RC2 applications on the same port

I want to be able to run two applications using the same port on this server. My task is that both applications have a host file containing the URL that it is listening on port 80. Usually, "WebServer" has the ability to create virtual hosts, but I do not know what I should do in this situation (minus googling a solution).

Any feedback is really appreciated.

Thanks!

+5
source share
1 answer

In a production environment, you usually want to use a reverse proxy server to forward requests to your sites running on Kestrel. You have configured ASP.NET Core applications to run on different ports, i.e. http://example.com►000 and http : //example.com►001 . Then you use IIS, Apache, nginx or similar to act as a reverse proxy. The reverse proxy server listens on port 80 and redirects incoming requests to Kestrel instances.

Example:

http://example.com/app1 --> http://example.com:5000 http://example.com/app2 --> http://example.com:5001 
+3
source

All Articles