There are now modules available for Nginx to enable lua/openresty functionality so for example you can install it on Debian (e.g. Ubuntu) based system:
sudo apt install libnginx-mod-http-lua
This should then provide lua/openresty functionality - provided your system includes the correct modules in the nginx.conf file - as happens on Ubuntu - i.e. it contains a line like this include /etc/nginx/modules-enabled/*.conf; which should include a mod-http-lua.conf file containing:
load_module modules/ngx_http_lua_module.so;