Since Ubuntu 20.04, the Ubuntu Server Team made a decision to drop the Lua module due to several factors including:
- Outdated Lua library support
- No
liblua-dev
suport in later versions of the Lua module
- Additional modules were required for future updates of the Lua module.
As such, NGINX in the Ubuntu repositories does not have Lua support and will not have Lua support going forward.
If you intend to use Lua with NGINX in Ubuntu, you need to install the complete OpenResty stack of NGINX - see https://openresty.org/en/linux-packages.html#ubuntu for installation instructions. Note that the Lua module actually originated from the OpenResty 'flavor' of nginx.
Note that additionally in later flavors of Ubuntu, the Lua module may become available as a standalone package NOT part of the nginx
source package, however the Lua module does not properly support ppc64el
and PowerPC architecture installations of Ubuntu, due to issues with the underlying LuaJIT requirements not working properly on those architectures (and with it removed from Debian now for those architectures).