I'm having some trouble by using the nginx devel (ndk) and lua-module. I compiled nginx-rpm using the following configuration:
./configure \
--prefix=%{_sysconfdir}/nginx/ \
--sbin-path=%{_sbindir}/nginx \
--conf-path=%{_sysconfdir}/nginx/nginx.conf \
--error-log-path=%{_localstatedir}/log/nginx/error.log \
--http-log-path=%{_localstatedir}/log/nginx/access.log \
--pid-path=%{_localstatedir}/run/nginx.pid \
--lock-path=%{_localstatedir}/run/nginx.lock \
--http-client-body-temp-path=%{_localstatedir}/cache/nginx/client_temp \
--http-proxy-temp-path=%{_localstatedir}/cache/nginx/proxy_temp \
--http-fastcgi-temp-path=%{_localstatedir}/cache/nginx/fastcgi_temp \
--http-uwsgi-temp-path=%{_localstatedir}/cache/nginx/uwsgi_temp \
--http-scgi-temp-path=%{_localstatedir}/cache/nginx/scgi_temp \
--user=%{nginx_user} \
--group=%{nginx_group} \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-mail \
--with-mail_ssl_module \
--with-file-aio \
--with-ipv6 \
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
--add-module=%{_builddir}/nginx-%{version}/mods/upload_progress \
--add-module=%{_builddir}/nginx-%{version}/mods/ngx_devel_kit \
--add-module=%{_builddir}/nginx-%{version}/mods/lua-nginx-module \
Calling nginx -V
after the installation also shows that ngx and lua seems to be installed/activated. But... when I do the following:
location /abc/ {
# For demonstration purposes only...
ngx.flush(true);
expires 30d;
}
I always get the following error:
nginx: [emerg] unknown directive "ngx.flush(true)" in /etc/nginx/conf.d/default.conf:53
nginx: configuration file /etc/nginx/nginx.conf test failed
What's wrong with my configuration? Is there anything I need to activate to use ngx-directives in the conf-file?
Thanks in advance for any suggestion!