如何编写 Nginx 模块?

发布于 2024-07-29 03:19:03 字数 1542 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

琉璃梦幻 2024-08-05 03:19:03

引用自文档:

Evan Miller 撰写了权威的 Nginx 模块开发指南
但其中的某些部分有点过时了。 我们已警告过您。

在 github 上搜索发现了 Nginx 开发套件。 好像是
更多最新信息。

从我个人的经验来看,Evan Miller 的指南很有帮助。 您还必须深入了解 NGINX 的工作原理。 Agentzh 的教程可以帮助您。

阅读他的模块的源代码也总是有帮助的。

还有一个视频教程,我还没有检查,但看起来不错。

Quoting from the documentation:

Evan Miller has written the definitive guide to Nginx module development.
But some parts of it are a little out of date. You've been warned.

A github search turned up the Nginx Development Kit. It seems to be
more up to date.

From my own personal experience, Evan Miller's guide was of a great help. You must also have a deep understanding of how NGINX works. Agentzh's tutorial can help you.

Reading the source code of his modules is always helpful too.

There is also a video tutorial that I haven't check yet, but it seems nice.

人疚 2024-08-05 03:19:03

http://www.evanmiller.org/nginx-modules-guide.html

Nginx 有一个模块链。 当 Nginx 需要对响应进行 gzip 或块编码时,它会生成一个模块来完成这项工作。 当 Nginx 根据 IP 地址或 HTTP 身份验证凭据阻止对资源的访问时,模块会进行偏转。 当Nginx与Memcache或FastCGI服务器通信时,模块就是对讲机......

本指南的目的是向您介绍 Nginx 模块链的详细信息...当您完成本指南后,您将能够设计和生成高质量的模块,使 Nginx 能够完成它的任务以前做不到。 Nginx 的模块系统有很多细微差别和细节,因此您可能需要经常回顾本文档。 我已经尽力使概念尽可能清晰,但我会直言不讳,编写 Nginx 模块仍然是一项艰苦的工作......

http://www.evanmiller.org/nginx-modules-guide.html

Nginx has a module chain. When Nginx needs to gzip or chunk-encode a response, it whips out a module to do the work. When Nginx blocks access to a resource based on IP address or HTTP auth credentials, a module does the deflecting. When Nginx communicates with Memcache or FastCGI servers, a module is the walkie-talkie...

The purpose of this guide is to teach you the details of Nginx's module chain... When you're done with the guide, you'll be able to design and produce high-quality modules that enable Nginx to do things it couldn't do before. Nginx's module system has a lot of nuance and nitty-gritty, so you'll probably want to refer back to this document often. I have tried to make the concepts as clear as possible, but I'll be blunt, writing Nginx modules can still be hard work...

菩提树下叶撕阳。 2024-08-05 03:19:03

您可以在此处找到官方 nginx 开发指南

文档的结尾导致了一个新的存储库(本文发布前 6 周),其中包含 此处的示例

You can find an official nginx development guide here.

The end of the document leads to a new repo (6 weeks before this post) full of examples here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文