Lua Wsapi |
|
(at least on a Ubuntu server)
Andrew Armstrong 2011 andrewa@archonix.co.uk
v0.1
1) Install some basic pre-requisites:
apt-get install libreadline-dev build-essential unzip
2) Install Apache and Fast cgi:
apt-get install apache2 libfcgi libfcgi-dev libapache2-mod-fcgid
3) Install LuaRocks
apt-get install luarocks
4) With LuaRocks install:
luarocks install wsapi-fcgi CFLAGS=-fPIC
luarocks install cgilua
5) Enable apache module
a2enmod fcgid
6) Edit your site:
sudo gedit /etc/apache2/sites-enabled/000-default
The /var/www entry should look something like this when you are finished:
9) Modify your /var/www .htaccess file:
Options +ExecCGI DirectoryIndex? index.lp
10) If you use MySQL, install mysql development headers:
apt-get install libmysqlclient-dev
11) Then.... Install the luasql module, you need the include dir:
luarocks install luasql-mysql MYSQL_INCDIR=/usr/include/mysql CFLAGS=-fPIC