Package Details: nginx-mainline-mod-lua 1:0.10.21-1

Git Clone URL: (read-only, click to copy)
Package Base: nginx-mainline-mod-lua
Description: Lua script engine module for mainline nginx
Upstream URL:
Licenses: BSD
Submitter: mtorromeo
Maintainer: ahmubashshir
Last Packager: ahmubashshir
Votes: 7
Popularity: 0.002444
First Submitted: 2017-04-06 09:53 (UTC)
Last Updated: 2022-05-18 23:47 (UTC)

Latest Comments

Stargateur commented on 2021-03-27 12:17 (UTC)

This doesn't to work at all

leuko commented on 2021-03-14 08:32 (UTC)

I installed luajit-openresty but get the following error:

configuring additional dynamic modules
adding module in ../lua-nginx-module-0.10.19
checking for LuaJIT library in /usr/lib and /usr/include/luajit-2.0 (specified by the LUAJIT_LIB and LUAJIT_INC env, with -ldl) ... found
checking for LuaJIT 2.x ... not found
    /usr/src/nginx/configure: error: unsupported LuaJIT version; ngx_http_lua_module requires LuaJIT 2.x.

installing luajit package solves the error, but luajit 2.0 is not recommended by openresty.

ahmubashshir commented on 2020-10-07 13:43 (UTC)

I have to apply this patch to keep nginx working...

--- src/lua-nginx-module-0.10.17/src/ngx_http_lua_util.c
+++ src/lua-nginx-module-0.10.17/src/ngx_http_lua_util.c
@@ -3926,9 +3926,24 @@

         lua_pop(L, 2);
     *new_vm = L;

+    int setLuaPath( lua_State* L, const char* path )
+    {
+        lua_getglobal( L, "package" );
+        lua_getfield( L, -1, "path" ); // get field "path" from table at top of stack (-1)
+        char cur_path[1024];
+        strcpy(cur_path, lua_tostring( L, -1 )); // grab path string from top of stack
+        strcpy(cur_path, ";");
+        strcpy(cur_path, path);
+        lua_pop( L, 1 ); // get rid of the string on the stack we just pushed on line 5
+        lua_pushstring( L, cur_path ); // push the new one
+        lua_setfield( L, -2, "path" ); // set the field "path" in table at -2 with value at top of stack
+        lua_pop( L, 1 ); // get rid of package table from top of stack
+        return 0; // all done!
+    }
+    setLuaPath(L, "./?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua");
     lua_getglobal(L, "require");
     lua_pushstring(L, "resty.core");

l1n commented on 2020-07-28 15:21 (UTC)

It's possibly that resty.core will need to be packaged as well, see (the lua-resty-core library is required since ngx_lua v0.10.16).

ahmubashshir commented on 2020-07-22 15:37 (UTC)

nginx-mainline fails to start throwing error.

Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file './resty/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/local/lib/lua/5.1/resty/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/lib/lua/5.1/resty/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/local/lib/lua/5.1/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file './'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/local/lib/lua/5.1/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/lib/lua/5.1/'
Jul 22 21:33:41 mubashshir-pc nginx[894599]:         no file '/usr/local/lib/lua/5.1/') in /etc/nginx/nginx.conf:242

amesgen commented on 2019-08-22 22:55 (UTC)

JFYI: the .SRCINFO is still on 0.10.13-6

mdevaev commented on 2018-08-17 21:44 (UTC)

Please fix sources url:$_modname-nginx-module/archive/v$pkgver.tar.gz

curl: (22) The requested URL returned error: 404 Not Found ==> ERROR: Failure while downloading Aborting...

xuanwo commented on 2018-04-27 07:02 (UTC) (edited on 2018-04-27 07:03 (UTC) by xuanwo)

Hi, Current pkgfile is out of date for nginx mainline is 1.13.12 for now.

Fixed by following diff:

theYinYeti commented on 2017-11-04 18:32 (UTC)

Hey @mtorromeo, I see you’re also the maintainer for this package. Well, same issue: Nginx-mainline is now at version 1.13.6…

mtorromeo commented on 2017-09-16 12:48 (UTC) (edited on 2017-12-01 14:42 (UTC) by mtorromeo)

I backported a patch for openssl 1.1 as suggested, since the package was not working anyway. Remember that this is a work in progress implementation that may work for you but may also present unintended side effects. DO NOT REPORT BUGS UPSTREAM if you are using this patched package as it is NOT SUPPORTED. Follow the previously linked discussions [1] and [2] for updates on the openssl 1.1 situation. Thanks! [1] [2]

theYinYeti commented on 2017-09-16 11:55 (UTC)

As it stands now, this module is useless. Until the problem is solved upstream, I suggest you apply the following patch: In short: — fix the Nginx version, that got behind the current 1.13.4 — fix the sha256sum of the patch (as already reported) — get the module from Git and checkout the release instead of directly downloading the release — apply and commit the patch in a dedicated branch — merge the OpenSSL-1.1 branch from upstream (work in progress, I guess, but it works for me…) — fix the compilation step, where parameters from `nginx -V` were improperly used

marcarrelus commented on 2017-07-10 18:03 (UTC) (edited on 2017-07-10 19:07 (UTC) by marcarrelus)

Hey mtorromeo, first of all thank you for this package. However, I have a few problems with it: - the sha256sum of the last source (the patch) is not correct, it should be: 5ffacce8d57f06bea215267739995ce74a9719ee3e57ae2728d3b088a35b3d5e - the patch does not compile: ../lua-nginx-module-0.10.8/src/ngx_http_lua_ssl_ocsp.c:471:17: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ if (ssl_conn->tlsext_status_type == -1) { ^~ make[1]: *** [objs/Makefile:2254: objs/addon/src/ngx_http_lua_ssl_ocsp.o] Error 1 make[1]: Leaving directory '/home/brecht/Downloads/nginx-mainline-mod-lua/src/nginx-1.13.0' make: *** [Makefile:14: modules] Error 2 ==> ERROR: A failure occurred in build(). EDIT ---- I also reported it upstream: There they said that it needs to be compiled against OpenSSL 1.0.X. Apparently, OpenSSL 1.0.2 is still available in the core repositories. After some tinkering with the package, I had to conclude that for the life of me I couldn't figure out how to build it against this version. Perhaps you know better what you are doing.

diraria commented on 2017-04-30 05:13 (UTC)

Hello, OK, thank you a lot

mtorromeo commented on 2017-04-29 17:57 (UTC)

Hi dima74, I backported a patch to fix the compilation error you mention but this is not enough to make it work. There is another compilation error due to the module not being compatible with openssl 1.1. I may build it against openssl-1.0 but the result would not be binary compatible with nginx-mainline which uses 1.1. We have to wait for a fix from upstream (see [1] and [2]). [1] [2]

diraria commented on 2017-04-29 15:05 (UTC)

I get compilation error, as in Maybe you will use master version, instead of 0.10.7? Thanks if answer something!