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

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

问题描述

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

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这样的Web服务器,但功能却少得多吗?

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服务器.您可以在 Linux Mac 上运行 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压缩. 红est 没有此功能.

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天全站免登陆