Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Missing nginx config file #11

Closed
josegonzalez opened this Issue · 12 comments

2 participants

@josegonzalez

This file is necessary to install lua-resty-redis into a custom nginx compilation. Is it available somewhere, or is this meant to be part of another module somehow?

@josegonzalez

For reference, the error is as follows:

jose@mactaku-3:~/Sites/seatgeek  $ brew install ./nginx-custom.rb --add-github-module=simpl/ngx_devel_kit --add-github-module=chaoslawful/lua-nginx-module --add-github-module=agentzh/lua-resty-redis
==> Downloading http://nginx.org/download/nginx-1.2.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/nginx-custom-1.2.4.tar.gz
==> Patching
patching file conf/nginx.conf
adding extra modules
- adding simpl from github...
- adding chaoslawful from github...
- adding agentzh from github...
==> ./configure --prefix=/usr/local/Cellar/nginx-custom/1.2.4 --with-http_ssl_module --with-pcre --with-ipv6 --with-cc-opt=-I/usr/local/include --with-ld-opt=-L/usr/local/lib --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/
checking for Lua library ... found
checking for export symbols by default ... not found
 + ngx_http_lua_module was configured
adding module in /private/tmp/nginx-custom-Ai9a/nginx-1.2.4/modules/agentzh/lua-resty-redis
./configure: error: no /private/tmp/nginx-custom-Ai9a/nginx-1.2.4/modules/agentzh/lua-resty-redis/config was found
@agentzh
Owner
@josegonzalez

Ah that makes sense. So how do I "install" it and reference from within my nginx configuration?

@agentzh
Owner
@josegonzalez

After I include the lua_package in it's path, I can use it as in your openresty example?

@agentzh
Owner
@josegonzalez

Something like:

    http {
        lua_package_path "/path/to/lua-resty-redis/lib/?.lua;;";
        local redis = require "resty.redis"
        ...
    }
@agentzh
Owner
@josegonzalez

So something like:

server {
    lua_package_path "/path/to/lua-resty-redis/lib/?.lua;;";

    location /test {
        content_by_lua '
            local redis = require "resty.redis"
            ...
        '
    }
}

?

@agentzh
Owner
@josegonzalez

Heh, will do. I mostly need a custom package - without some openresty stuff, and with other things - so just trying openresty won't solve all my problems.

Thanks for the advice, I'll let you know how it went and open a PR for this soon!

@agentzh
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.