aspnet / Hosting

[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
Apache License 2.0
552 stars 312 forks source link

Roadmap: Apache/NGINX InProc hosting #1564

Closed Wayne-Mather closed 5 years ago

Wayne-Mather commented 5 years ago

Hi,

What is the road map to have a better hosting experience on a *NIX OS?

Currently the only solution is to start the application at bootup and setup a reverse proxy to the Kestral server. If you are going to host multiple .NET Core sites this model is rather inflexible and requires port binding for every .NET app you want to run.

Is there are roadmap for how hosting is going to work under Apache/NGINX moving forward?

The quickest fix is can a hosting provider change the default port at runtime? ie: dotnet xxx.dll -port 23678.

The hosting provider may not have the ability to modify the source code so binding would have to be modified at run time without recompiling the application.

Tratcher commented 5 years ago

We've discussed better out of process integration (UseNginxIntegration), but nothing for in process.

The caller can set the binding url at runtime (dotnet xxx.dll -url http://localhost:23678), but you have to be careful that the app doesn't override it. It will work fine if the process hasn't tried to configure any bindings explicitly in code.

muratg commented 5 years ago

We won't be doing this.

Wayne-Mather commented 5 years ago

@muratg Not everyone uses docker. I need to sit behind a single Apache instance due to shared public IP addresses. It seems that dotnet core will not support this hosting model easily.

I think ignoring this is not a very good decision for the framework. I think the simple fix should be if a port is specified at runtime with some override flag, it should override any compile time options. That would allow the architecture described above to work without to much effort for the cli/mvc