lua-users home
lua-l archive

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


When Apache gives a 500 error you should look in /var/log/apache/error.log for the message, it should help you identify what is wrong.

Regards,
Matthew

On 17 Oct 2011 16:29, "Luciano de Souza" <luchyanus@gmail.com> wrote:

I am trying to run test.lp from the example folder of CGIlua.

Having downloaded cgilua from Luarocks, I found the following content:

./.luarocks/bin/cgilua.cgi
./.luarocks/lib/lua/5.1/lfs.so
./.luarocks/share/lua/5.1/chilua

I moved the all content   in each folder to the respective position in /usr. The directory /usr/lib/lua/5.1 didn't not exist. So I created it.

I moved also the example folder to /usr/lib/cgi-bin and I give 755 permission for all.

I try:

http://localhost/cgi-bin/test.lp

"500: internal server error"

Reading the specific instructions for Apache, I understood that cgilua.cgi should be in /usr/lib/cgi-bin. I did it. The result is 500 error.

So I remember Apache has two important folders:

/usr/lib/cgi-bin
/var/www

I placed test.lp /var/www. The content is shown, but also all its code without any interpretation.

I placed cgilua.lcgi in /var/www. The result was the same.

In test.lp I always made sure that "#!" points to the cgilua.cgi location.

I could not understand. Running CGI with Pascal, it's sufficient to place cgi module in /usr/lib/cgi-bin and call something like: http://localhost/cgi-bin/test.cgi.

As Lua is an interpreted language, I don't know if the procedure is the same.

Well, perhaps the first "hello world" is a little bit more complicated than we would like.

Sorry for asking so much.


Em 17-10-2011 12:06, Peng Zhicheng escreveu:


>
> 于 2011-10-17 21:22, Luciano de Souza 写道:
>>
>> Step by step, let me describe what I could under...