I rpm installed nginx 1.12 on a redhat 7.5 server and It also has LUA 5.1.4 I downloaded lua-nginx-module-0.10.13 tar ball and put it under /etc/nginx/modules, but I am not able to run nginx with LUA auth file.
I also have openresty under /opt/openresty/ ..
http://openresty.org/en/installation.html I followed the "make" method here.
Unfortunately this server doesnt have access to the internet so I cant install stuff from git which slows this down considerably. I am not sure how to add the module here. Any comments would be helpful.
This is what my nginx config looks like ..
server
{
listen 80;
access_log /opt/elk/logs/nginx/access.log main;
#auth_basic "admin";
#auth_basic_user_file "/etc/nginx/passwd";
client_max_body_size 100M;
location /
{
proxy_pass http://127.0.0.1:9200;
keepalive_timeout 300s;
#auth_basic on;
auth_basic "admin";
auth_basic_user_file "/etc/nginx/passwd";
access_by_lua_file '/etc/nginx/authorized.lua';
}
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root /usr/share/nginx/html;
}
}
The lua_access_file is causing an error
nginx: [emerg] unknown directive "access_by_lua_file" Is there some "include" I need to define in the config to get rid of this ?
Thanks.