views:

112

answers:

3

Hello,

I need to find a very compact, cross-platform web server that can run Lua scripts, ie. either a regular web server like Mongoose that will forward queries to a Lua program in eg. FastCGI, or a web server itself written in Lua which will save the need to provide a separate web server.

I recently started learning about Lua so am still in the dark about what is available out there, save for the three I came accross:

Barracuda Embedded Web Server http://barracudaserver.com/ba/doc/

Xavante - Lua HTTP 1.1 Web server http://keplerproject.github.com/xavante/

Haserl http://haserl.sourceforge.net/

If someone's already done this recently, what solution would you recommend along with any tutorial/article that would get me started?

Thank you.

+2  A: 

Why not try Xavante, the Lua-oriented web server built by the Kepler project, which is run by many of the same people who brought us Lua?

Norman Ramsey
I haven't found how to install Xavante yet. Can it run without installing the whole Lua SDK?
OverTheRainbow
there is no lua sdk...
daurnimator
For lack of a better word, I meant, the packages found at http://luabinaries.luaforge.net/ and http://code.google.com/p/luaforwindows/
OverTheRainbow
A: 

There's also lighttpd.

lhf
Apparently, Lighttpd supports Lua but only for mod_madgnet, as the equivalent to Apache's mod_rewrite. I don't know 1) if that's true, and if yes, 2) what the (dis)advantages are compared to a full-fledged FastCGI alternative.
OverTheRainbow
The lighthttpd is not suitable for generating page content with Lua (script execution blocks whole server process, AFAIR). It is intended to control server logic.
Alexander Gladysh
Yup, so I'd rather use a web server that's already written in Lua or, alternatively, a good way to run a Lua script as FastCGI that will be called by a language-agnostic web server.
OverTheRainbow
A: 

I have not tried this myself, but there is a blog post about using Lua with nginx here.

A good and informative question btw, I hadn't heard of Haserl before :)

ponzao