N
N
Northxstar2020-01-13 19:33:45
Nginx
Northxstar, 2020-01-13 19:33:45

How to build nginx with lua?

Task: build nginx with lua support.
After installing the basic dependencies and swapping, in fact, the modules, go to configure:

./configure \
    --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' \
    --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' \
    --sbin-path=/usr/sbin/nginx \
    --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 \
    --http-client-body-temp-path=/var/lib/nginx/body \
    --http-proxy-temp-path=/var/lib/nginx/proxy \
    --with-debug \
    --with-pcre-jit \
    --with-ipv6 \
    --with-http_ssl_module \
    --with-http_stub_status_module \
    --with-http_realip_module \
    --with-http_auth_request_module \
    --with-http_addition_module \
    --with-http_dav_module \
    --with-http_geoip_module \
    --with-http_gzip_static_module \
    --with-http_image_filter_module \
    --with-http_spdy_module \
    --with-http_sub_module \
    --with-http_perl_module \
    --add-module=/root/buildnginx/build/nginx-dav-ext-module \
    --add-module=/root/buildnginx/build/nginx-upstream-fair \
    --add-module=/root/buildnginx/build/ngx_http_substitutions_filter_module \
    --add-module=/root/buildnginx/build/ngx_devel_kit \
    --add-module=/root/buildnginx/build/lua-nginx-module

Where /root/buildnginx/build/ is the path where the unpacked *.tar.gz with modules are located.
And this is what we get:
configuring additional modules
adding module in nginx-dav-ext-module
./configure: 17: .: Can't open auto/module

The path to the modules is correct and every module behaves like this. I put folders with modules next to the script (I thought I didn't like the paths in the arguments) - it didn't help. Where to dig?
UPD: nginx version 1.6.0

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Northxstar, 2020-01-13
@Northxstar

With load_modules everything took off, thanks everyone

K
ky0, 2020-01-13
@ky0

Try --add-dynamic-module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question