Re: Enabling lua in Nginx 1.18.0
On Tue, Nov 23, 2021 at 02:37:37PM +, BELUCHE Yannick wrote: Hi there, > $> nginx -t > nginx: [emerg] unknown directive "access_by_lua" in > /etc/nginx/nginx-lua-headers.conf:91 That form of message means that the matching module is not present in the running nginx. > However it seems by typing nginx -V that the http-lua module is installed : > > $> nginx -V 2>1& | tr ' ' '\n' n > --add-dynamic-module=/build/nginx-KTLRnK/nginx-1.18.0/debian/modules/http-lua "dynamic" means that at configure time, that module was set to be built as a thing that can be loaded at run-time. But until it actually is loaded, it is not present in the running nginx. See http://nginx.org/r/load_module > 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... > Maybe the older version included a "load_module" directive that the newer version does not? Good luck with it, f -- Francis Dalyfran...@daoine.org ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
RE: Enabling lua in Nginx 1.18.0
I misread your version sorry. This needs a bug filed in Ubuntu as I think the Lua module being 'loaded' doesnt necessarily mean it works. Unless someone has an easy fix for you, its possible this is a bug in that nginx version/lua module in the reposSent from my T-Mobile 5G Device Original message From: BELUCHE Yannick 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
RE: Enabling lua in Nginx 1.18.0
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 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