Unix installation
Ubuntu server edition with fastcgi
sudo apt-get install lighttpd unzip libreadline-dev build-essential libfcgi-dev
wget http://luaforge.net/frs/download.php/4017/kepler-install-1.1.1-2 (or later)
chmod +x kepler-install-1.1.1-2
sudo ./kepler-install-1.1.1-2
sudo luarocks install kepler-fastcgi
sudo vim /etc/lighttpd/lighttpd.conf
add "mod_fastcgi" to server.modules
server.modules += ("mod_fastcgi")add
fastcgi.server = ( ".ws" => ( "localhost" => ( "socket" => "/tmp/kepler-fastcgi.socket", "bin-path" => "/usr/local/lib/luarocks/bin/wsapi.fcgi" ) ) )sudo /etc/init.d/lighttpd restart
You can now test a simple hello world to make sure everything works as expected:
sudo vim /var/www/hello.ws
require "wsapi.response" function run(wsapi_env) local res = wsapi.response.new() res:write("Hello World!") return res:finish() end return runNavigate to http://localhost/hello.ws to make sure it displays correctly.
Note: Do not use the cgilua.fcgi binary provided with kepler unless you must. It is included right now mostly as legacy, so it is not really tuned for performance. wsapi.fcgi will provide much better performance.