Enabling lua in Nginx 1.18.0
Francis Daly
francis at daoine.org
Tue Nov 23 17:04:06 UTC 2021
On Tue, Nov 23, 2021 at 02:37:37PM +0000, 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 Daly francis at daoine.org
More information about the nginx
mailing list