[emerg] unknown directive "rewrite_by_lua_file" in /usr/local/nginx

Joel Parker joel.parker.gm at gmail.com
Wed Oct 25 22:55:07 UTC 2017

I have configured nginx-1.9.2 to evaluate a third party module and
configure the source like this:

./configure --add-module=../ngx_http_proxy_connect_module-master/
--add-module=../lua-5.1.4/ --with-http_ssl_module

After compiling the version shows what I configured:
 # nginx -V
 nginx version: nginx/1.9.2
 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
 built with OpenSSL 1.0.2k-fips  26 Jan 2017
 TLS SNI support enabled
 configure arguments: --add-module=../ngx_http_proxy_connect_module-master/
--add-module=../lua-5.1.4/ --with-http_ssl_module

I have lua installed as well as compiled into nginx:
# lua
Lua 5.1.4  Copyright (C) 1994-2008
Lua.org, PUC-Rio

When I try to load my config file, I get this error message:
# nginx -t
nginx: [emerg] unknown directive "rewrite_by_lua_file" in
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

 I am trying to figure out what I did wrong to receive this error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20171025/56eff0e0/attachment.html>

More information about the nginx mailing list