Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which web server are you using in production for ASP.NET Core on a *nix server?

With ASP.NET Core now released, I was wondering what the best hosting option is for Linux and Mac environments. Is there any production grade web server under active development?

The only one I'm aware of is Kestrel that ships with the framework. From the docs, it appears that Kestrel is missing several features in comparison with IIS

enter image description here

This Stackoverflow answers suggests that .NET Core apps would work with any HTTP server. Does this mean it will work with say, Apache? Would it be missing any features if so? I was under the impression that it works only with OWIN based servers. Am I missing something?

like image 518
reggaemahn Avatar asked Jan 05 '16 19:01

reggaemahn


People also ask

What server does ASP.NET Core use?

ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server. ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server.

What web server is used by ASP.NET Core internally for cross-platform hosting?

Kestrel is a cross-platform web server for ASP.NET Core. Kestrel is the web server that's included by default in ASP.NET Core project templates.


1 Answers

Use Kestrel, it's the way going forward. Refer to this: Change to IIS hosting model.

Does this mean it will work with say, Apache?

Yes and indeed that's the recommended approach. However, never expose Kestrel to outside world directly. Always put it behind a web server like nginx, IIS, HAProxy or Apache. More about Kestrel:

  • ASP.NET 5: Kestrel
  • ASP.NET 5: Considerations for Production Linux Environments

Some examples of using those reverse proxies:

  • NGINX Reverse Proxy and Load Balancing for ASP.NET 5 Applications
  • ASP.NET Core Authentication in a Load Balanced Environment with HAProxy and Redis
like image 62
tugberk Avatar answered Sep 28 '22 08:09

tugberk