Or run the following command:
bash < <(curl -s https://gist.github.com/jmervine/5407622/raw/nginx_w_lua.bash)
Note: This script has been tested on
Ubuntu 12.04.2 LTSbut should work on just about any unix based distro, as everything is compiled from source.
Requires wget and basic build essentials.
configureNginx with lua-nginx-module
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH /opt/nginx/sbin/nginx -c /path/to/nginx.conf
sudo /etc/init.d/nginx stop
/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.