为什么 Linux 上的 ASP.NET 5 需要 kestrel? [英] Why does ASP.NET 5 on Linux require kestrel?

查看:24
本文介绍了为什么 Linux 上的 ASP.NET 5 需要 kestrel?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Linux 上安装 ASP.NET 5 时,我试图了解整个网络/框架/应用程序堆栈.

I am trying to understand the entire web/framework/application stack when installing ASP.NET 5 on Linux.

我读过的所有说明,包括这个 还没有真正回答我的问题:

All the instructions I have read, including this one haven't really answered my question:

为什么 Nginx 服务器不能没有像这里这样的 Kestrel 工作:http://www.mono-project.com/docs/web/fastcgi/nginx/ ?

Why can't Nginx server work without Kestrel like here: http://www.mono-project.com/docs/web/fastcgi/nginx/ ?

或者我离题了.我试图了解这种结构的原因是什么:

Or am I way off. I'm trying to understand what the reason is for this structure:

.NET Core(or mono) --> Kestrel --> Nginx

Kestrel 不就是另一个像 Nginx 一样但功能少得多的网络服务器吗?

Isn't Kestrel just another web server like Nginx but with a lot less features?

推荐答案

ASP.NET Core (ASP.Net 5) 不需要 Kestrel

ASP.NET Core (ASP.Net 5) doesn't require Kestrel!

您说得对,Kestrel 只是一个简单的 HTTP 服务器,具有一小部分功能.您可以在 LinuxMac 上运行 ASP.NET Core 而无需 Kestrel,但您必须有一个 HTTP 服务器或 fastCGI 服务器.

You're right, Kestrel is just a simple HTTP server with a small set of features. You can run ASP.NET Core without Kestrel on Linux or Mac, but you must either have an HTTP server or a fastCGI server.

Nginx 通常用作静态内容的反向代理,您还可以对动态内容启用 gzip 压缩.Kestrel 没有此功能.

Nginx is used as a reverse proxy for static contents in general and you can also enable gzip compression on your dynamic content. Kestrel doesn't have this feature.

您还可以使用您需要的特定 HTTP 功能(例如 HTTP2)编写自己的 HTTP 服务器.

You can also write your own HTTP server with the specific HTTP features you need (HTTP2 for example).

这篇关于为什么 Linux 上的 ASP.NET 5 需要 kestrel?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆