Skip to content

Instantly share code, notes, and snippets.

@henter
Forked from jugyo/gist:3882497
Created March 5, 2014 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henter/9361821 to your computer and use it in GitHub Desktop.
Save henter/9361821 to your computer and use it in GitHub Desktop.

Installation

http://wiki.nginx.org/HttpLuaModule#Installation

install LuaJIT

$ brew install luajit

download ngx_devel_kit

$ cd /usr/local/src
$ git clone https://github.com/simpl/ngx_devel_kit.git

download lua-nginx-module

$ cd /usr/local/src
$ git clone https://github.com/chaoslawful/lua-nginx-module.git

add configure options (via brew edit nginx)

--add-module=/usr/local/src/ngx_devel_kit
--add-module=/usr/local/src/lua-nginx-module

compile nginx

$ export LUAJIT_LIB=/usr/local/Cellar/luajit/2.0.0-beta10/lib
$ export LUAJIT_INC=/usr/local/Cellar/luajit/2.0.0-beta10/include/luajit-2.0
$ brew install nginx

Tips

logging

ngx.log(ngx.ERR, "foo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment