ITADN
ezmobius/super-nginx
ezmobius/super-nginx · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

这是一个功能极为强大的 Nginx 构建版本,集成了市面上大多数优秀的模块。

它已针对 luajit-beta-6 进行了少量修补,同时我还制作了一个“开箱即用”的 luajit 安装工具,该工具也包含在这个软件包中。

您首先需要安装 Cmake: http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz (在安装程序的最后询问时,请务必同时安装对应的 bin 脚本。)

现在,要构建 super-nginx,只需在该代码仓库的顶层执行以下命令即可:

./build.sh

如果您还希望它自动构建 luajit-beta6,可以执行:

./build --with-luajit

./build --help 也可以显示使用方法。

如果您还没有安装 LuaJit,且希望获得完整的一体化解决方案,请务必加上 --with-luajit 参数。

最终,您会在该 git 仓库的顶层看到一个名为 ‘super-nginx’ 的目录,其功能简直强得离谱。

启动它的方法如下:

$

http://localhost:3000/

所包含的 nginx.conf 文件中已预设了几个示例,不妨尝试访问这些 URL,并查看 nginx.conf 的内容以了解其工作原理:

hello world

location /

使用 nginx 变量与 lua 结合实现的另一个 hello world 示例

location /concat

尝试访问 /nginx_var?a=urmom

location /nginx_var

通过 subrequests 在 Lua 中实现透明非阻塞 I/O

location /lua

GET /recur?num=5,这是 nginx.conf 文件中递归功能的非常酷的示例

location /recur

非常感谢 @agentzh 和 @chaoslawful 开发的出色 nginx 模块, 同时也感谢其他为该版本贡献模块的作者们。

这几乎让 nginx 本身变成了一款强大的应用服务器,你可以在其中使用 Lua 编写异步应用程序,这些程序以协程形式在 nginx 内部运行,而不会阻塞 nginx 的事件循环。

这确实是极其强大的功能,绝对值得撰写博客文章,相关内容将会发布在我的博客上:http://brainspl.at

包含的模块: array-var-nginx-module chunkin-nginx-module drizzle-nginx-module echo-nginx-module encrypted-session-nginx-module form-input-nginx-module headers-more-nginx-module lua-nginx-module lua-redis-parser memc-nginx-module nginx-eval-module nginx-upload-module nginx-upload-progress-module ngx_devel_kit ngx_http_auth_request_module ngx_http_upstream_keepalive rds-json-nginx-module redis2-nginx-module set-misc-nginx-module srcache-nginx-module xss-nginx-module