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
logging
ngx.log(ngx.ERR, "foo")
New year, new steps to do it:
brew tap denji/nginx
brew install homebrew/nginx/nginx-full --with-lua-module --with-set-misc-module
https://github.com/denji/homebrew-nginx