- Install openresty (nginx w/ luajit & luasec)
- On a Mac, run
brew update && brew install homebrew/nginx/openresty && brew intall glide. - For other platforms, visit the installation page for installation details.
git clone https://github.com/30x/gatekeeper.git.cd gatekeeperand runmakeinstall Lua libs and build the shared lib.
- Download a release from Github and unzip.
- Edit
nginx/nginx.confand modify the paths around line 22 to match the paths on your system:
local handlers = {
dump = 'file:///Users/sganyo/dev/gatekeeper/pipes/dump.yaml',
apikey = 'file:///Users/sganyo/dev/gatekeeper/pipes/apikey.yaml'
}
- Run
./start.shto start nginx (openresty must be on the path)
- Note: If you receive an error:
nginx: [warn] 7168 worker_connections exceed open file resource limit, increase your resource limit with the commandulimit -n 7168
You should now be able to run a pipe:
- Run
curl localhost:9000. You should see a response likeHello, Guest! - Look at run/error.log. You should see request and response logging from the
dumpplugin.
- Run
./stop.shto stop openresty
For custom configuration, change the following:
nginx/nginx.conffor host/path definitions and assignmentpipes/default.yamlfor pipe definitionsplugins/plugins.goto add plugins
Note: If you add plugins, you'll need to run make again.