lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


	Hi Gilles

	Have you tried the examples in Haserl's man-page:

http://haserl.sourceforge.net/manpage.html#lbAJ

	Anyway, if you are seeing the source code, it seems the
interpreter (which should be /usr/bin/haserl) is not being called...
Are you sure the configuration file you showed in the message was loaded
by the server?

	Regards,
		Tomás

On Tue, 28 Jan 2014, Gilles Ganault wrote:

Hello

To run a small-scale web site on an appliance, I'd like to run Lua
scripts through Mini-httpd (or thttpd, if needed).

Using the following with Mini-httpd, the server displays the source
code instead of actually running the Lua script:

/etc/mini-httpd.conf:
===============================
host=0.0.0.0
port=9999
user=nobody
nochroot # no
data_dir=/tmp/mini-httpd
cgipat=**.cgi,**.lua
logfile=/tmp/mini-httpd/mini-httpd.log
pidfile=/var/run/mini-httpd.pid
charset=iso-8859-1
===============================

/tmp/mini-httpd/hello.lua:
===============================
#!/usr/bin/haserl --shell=lua
<% io.write ("Hello World" ) %>
===============================

Does someone run Lua successfully in CGI, either directly or through
Haserl?

Thank you.