Or run the following command:
bash < <(curl -s https://gist.github.com/jmervine/5407622/raw/nginx_w_lua.bash)
- Download LuaJIT 2.0.1
- Install LuaJIT 2.0.1
- Link
luajittolua - Download NDK
- Download lua-nginx-module
- Download Nginx 1.2.8
configureNginx with lua-nginx-module- Install Nginx
Binary Results:
/opt/nginx/sbin/nginx/usr/local/bin/lua/usr/local/bin/luajit
Lib Results:
/usr/local/lib/*lua*
Include Results:
/usr/local/include/luajit-2.0/*
$ LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH /opt/nginx/sbin/nginx -c /path/to/nginx.conf
Stop Nginx: sudo /etc/init.d/nginx stop
Patch /etc/init.d/nginx like so:
13,14c13,18
< PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
< DAEMON=/usr/sbin/nginx
---
> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
>
> # ensure default configuration location
> test "$DAEMON_OPTS" || DAEMON_OPTS="-c /etc/nginx/nginx.conf"
> PATH=/opt/nginx/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> DAEMON=/opt/nginx/sbin/nginx`
Note: the above may not be the best way, but it's what I had to do to get it to work and I didn't have a ton of time to mess with it.
hi, NO. 18 line of nginx_w_lua.bash should add "cd /tmp".