Welcome! Log In Create A New Profile

Advanced

RE: Enabling lua in Nginx 1.18.0

Thomas Ward
November 23, 2021 10:22AM
nginx upstream has nothing to do with the NGINX packages in Ubuntu.The Lua module in Ubuntu was removed and dropped by the Server Team's decision that supporting it requires excess work into the future that they were not willing to support as well as additional modules like resty core just to make Lua work.You need to go and install OpenResty's nginx fork and modules to get Lua in ubuntu 20.04.  Also, the Lua module is not maintained by NGINX either.Sent from my T-Mobile 5G Device
-------- Original message --------From: BELUCHE Yannick <yannick.beluche@thalesgroup.com> Date: 11/23/21 09:38 (GMT-05:00) To: nginx@nginx.org Subject: Enabling lua in Nginx 1.18.0

Hello,
 
I installed Nginx and Nginx-extra on an Ubuntu Focal 20.04.2 LTS server. I wanted to use access_by_lua directive and I got an error :

$> nginx –t
nginx: [emerg] unknown directive “access_by_lua” in /etc/nginx/nginx-lua-headers.conf:91
 
However it seems by typing nginx –V that the http-lua module is installed :

 
$> nginx –V 2>1& | tr ' ' '\n'
nginx
version:
nginx/1.18.0
(Ubuntu)
built
with
OpenSSL
1.1.1f

31
Mar
2020
TLS
SNI
support
enabled
configure
arguments:
--with-cc-opt='-g
-O2
-fdebug-prefix-map=/build/nginx-KTLRnK/nginx-1.18.0=.
-fstack-protector-strong
-Wformat
-Werror=format-security
-fPIC
-Wdate-time
-D_FORTIFY_SOURCE=2'
--with-ld-opt='-Wl,-Bsymbolic-functions
-Wl,-z,relro
-Wl,-z,now
-fPIC'
--prefix=/usr/share/nginx
--conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access.log
--error-log-path=/var/log/nginx/error.log
--lock-path=/var/lock/nginx.lock
--pid-path=/run/nginx.pid
--modules-path=/usr/lib/nginx/modules
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--with-debug
--with-compat
--with-pcre-jit
--with-http_ssl_module
--with-http_stub_status_module
--with-http_realip_module
--with-http_auth_request_module
--with-http_v2_module
--with-http_dav_module
--with-http_slice_module
--with-threads
--with-http_addition_module
--with-http_flv_module
--with-http_geoip_module=dynamic
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_image_filter_module=dynamic
--with-http_mp4_module
--with-http_perl_module=dynamic
--with-http_random_index_module
--with-http_secure_link_module
--with-http_sub_module
--with-http_xslt_module=dynamic
--with-mail=dynamic
--with-mail_ssl_module
--with-stream=dynamic
--with-stream_ssl_module
--with-stream_ssl_preread_module
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-headers-more-filter
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-auth-pam
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-cache-purge
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-dav-ext
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-ndk
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-echo
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-fancyindex
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/nchan
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-lua
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/rtmp
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-uploadprogress
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-upstream-fair
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-subs-filter
--add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-geoip2
 
the weird thing is that I did the same thing on an older version of Ubuntu (Xenial – 16.04.2 LTS) (ie: apt install nginx nginx-extras) and the directive “access_by_lua” works out of the box on it…
 
Can someone please help me with that ?
 
Thanks in advance!
Regards,
 
Yannick



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Enabling lua in Nginx 1.18.0

BELUCHE Yannick November 23, 2021 09:38AM

RE: Enabling lua in Nginx 1.18.0

Thomas Ward November 23, 2021 10:22AM

RE: Enabling lua in Nginx 1.18.0

Thomas Ward November 23, 2021 10:26AM

Re: Enabling lua in Nginx 1.18.0

Francis Daly November 23, 2021 12:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready