lua-users home
lua-l archive

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


Hello listers,
For several times, I tried to run cgilua. It seems to be very simple
to program. However, up to now, I confess I heven't been pacient to
understand the web server configurations.
I did:

luarocks install cgilua
luarocks install xavante

I can't imagine something simpler to install. Luarocks is really a
magic project.
the problem is what to do after.
I thought: "Here, in cgilua examples, I have the test.lp script. I
need to put it in the correspondent Xavante hdocs.
I searched something about Xavante. I found this link:
http://keplerproject.github.io/xavante/manual.html
I have never configured a web server. I had to brief experiences with
web development.
When I used Pascal, it was enough to install and start Apache and
leave my cgi (the Pascal executable) in ~/apache/cgi-bin.
When I used PHP, it was enough to install XAMP and save a PHP script
in ~/apache/hdocs.
In both cases, it was enogh to run my applications accessing:
http://localhost/test.php or http://localhost/cgi-bin/test.cgi.
Since I have never configured a web server, I didn't understand what
was said in manual located in
http://keplerproject.github.io/xavante/manual.html.
In my previous experience, I didn't deal with handlers, regular
expressions, remappings, etc. Of course, I don't expect advance in
cgilua studies without understanding it. However, I could'nt run  even
a "hello world".
My questions are:
1. Is there a way to run Lua scripts in Apache without complex configurations?
2. Regarding cgilua, Xavante or any other modules, or any other web
servers, is there a way to run Lua scripts?
I am really lost. I didn't understand the difference between to run
Xavante as a library or as an application. I didn't understand
I didn't understand the meaning of commands like:

local webDir = XAVANTE_WEB

If this is the definition of a served path, I really don't understand
where I should save my Lua scripts to be runned.
Bellow, I found:
      params = {baseDir = webDir}
The doubt where to save the scripts remains!
In other words, I couldn't understand how to configure Xavante.
Regarding this is necessarily the first step, I failed completely.
Regards,
Luciano