From 89382ffac3aca92aab6abc341d00acc0576cfe60 Mon Sep 17 00:00:00 2001 From: Yaroslav Zhuravlev Date: Mon, 6 Jan 2025 16:55:41 +0000 Subject: [PATCH 1/2] Added lua_stream to Lua Dynamic Module --- content/nginx/admin-guide/dynamic-modules/lua.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/nginx/admin-guide/dynamic-modules/lua.md b/content/nginx/admin-guide/dynamic-modules/lua.md index ffb12152b..1cc33eeda 100644 --- a/content/nginx/admin-guide/dynamic-modules/lua.md +++ b/content/nginx/admin-guide/dynamic-modules/lua.md @@ -15,7 +15,7 @@ Integrate Lua co-routines into the NGINX event-processing model with the communi 1. Check the [Technical Specifications]({{< relref "../../technical-specs.md" >}}) page to verify that the module is supported by your operating system. -2. Prior to installing the module, verify that the [NDK]({{< relref "ndk.md" >}}) module is already installed. +2. Prior to installing the module, verify that the [NGINX Developer Kit (NDK)]({{< relref "ndk.md" >}}) module is already installed. @@ -64,18 +64,19 @@ Integrate Lua co-routines into the NGINX event-processing model with the communi ## Configuration -After installation you will need to enable and configure the module in F5 NGINX Plus configuration file `nginx.conf`. +After installation you will need to enable and configure the modules in NGINX Plus configuration file `nginx.conf`. 1. Enable dynamic loading of NDK and Lua modules with the [`load_module`](https://nginx.org/en/docs/ngx_core_module.html#load_module) directives specified in the top-level (“`main`”) context: ```nginx load_module modules/ndk_http_module.so; load_module modules/ngx_http_lua_module.so; + load_module modules/ngx_stream_lua_module.so; ``` - {{< note >}} The directives must be in this order. {{< /note >}} + {{< note >}} The `ndk_http_module.so` module must be placed first. {{< /note >}} -2. Perform additional configuration as required by the [module](https://github.com/openresty/lua-nginx-module). +2. Perform additional configuration as required by the modules. See [`lua-nginx-module`](https://github.com/openresty/lua-nginx-module) and [`stream-lua-nginx-module`](https://github.com/openresty/stream-lua-nginx-module) documentation for details. 3. Test the configuration and reload NGINX Plus to enable the module: @@ -87,7 +88,11 @@ After installation you will need to enable and configure the module in F5 NGINX ## More Info -- [NGINX Lua Module Reference](https://github.com/openresty/lua-nginx-module) +- [The `lua-nginx-module` Module Reference](https://github.com/openresty/lua-nginx-module) + +- [The `stream-lua-nginx-module` Module Reference](https://github.com/openresty/stream-lua-nginx-module) + +- [The NDK Module Reference](https://github.com/vision5/ngx_devel_kit) - [NGINX Dynamic Modules]({{< relref "dynamic-modules.md" >}}) From 37c907ee58a076783baba55314003d4d04c054f4 Mon Sep 17 00:00:00 2001 From: yar Date: Tue, 7 Jan 2025 09:42:38 +0000 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Travis Martin <33876974+travisamartin@users.noreply.github.com> --- content/nginx/admin-guide/dynamic-modules/lua.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/nginx/admin-guide/dynamic-modules/lua.md b/content/nginx/admin-guide/dynamic-modules/lua.md index 1cc33eeda..58e53420b 100644 --- a/content/nginx/admin-guide/dynamic-modules/lua.md +++ b/content/nginx/admin-guide/dynamic-modules/lua.md @@ -15,7 +15,7 @@ Integrate Lua co-routines into the NGINX event-processing model with the communi 1. Check the [Technical Specifications]({{< relref "../../technical-specs.md" >}}) page to verify that the module is supported by your operating system. -2. Prior to installing the module, verify that the [NGINX Developer Kit (NDK)]({{< relref "ndk.md" >}}) module is already installed. +2. Prior to installing the module, verify that the [NGINX Developer Kit (NDK)]({{< relref "nginx/admin-guide/dynamic-modules/ndk.md" >}}) module is already installed. @@ -64,7 +64,7 @@ Integrate Lua co-routines into the NGINX event-processing model with the communi ## Configuration -After installation you will need to enable and configure the modules in NGINX Plus configuration file `nginx.conf`. +After installation, enable and configure the modules in NGINX Plus configuration file `nginx.conf`. 1. Enable dynamic loading of NDK and Lua modules with the [`load_module`](https://nginx.org/en/docs/ngx_core_module.html#load_module) directives specified in the top-level (“`main`”) context: @@ -76,7 +76,7 @@ After installation you will need to enable and configure the modules in NGINX Pl {{< note >}} The `ndk_http_module.so` module must be placed first. {{< /note >}} -2. Perform additional configuration as required by the modules. See [`lua-nginx-module`](https://github.com/openresty/lua-nginx-module) and [`stream-lua-nginx-module`](https://github.com/openresty/stream-lua-nginx-module) documentation for details. +2. Configure additional settings as needed for the modules. For details, see the [`lua-nginx-module`](https://github.com/openresty/lua-nginx-module) and [`stream-lua-nginx-module`](https://github.com/openresty/stream-lua-nginx-module) documentation. 3. Test the configuration and reload NGINX Plus to enable the module: