lua-users home
lua-l archive

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


	Hi

> I am wondering what changes is needed to make this
> work in a shared hosting envirnoment.
> 
> That is I cannot call the lua adapted cgi/fastcgi
> launcher from the web server(apache2). Do I just do it
> in my script like:
> 
> #!/usr/bin/lua
> require 'cgilua'
> return cgi.main()
	I think this won't work.  Unfortunatelly, this is a
common mistake.  CGI launcher is the way to call CGILua scripts
when you don't have a module.  The script would be called by the
`cgilua.main' function, so you don't need to `require"cgilua"'.
A simple "hello world" Lua script should be:

cgilua.htmlheader()
cgilua.put"Hello World!"

	The cgi launcher might have been installed in a script-
enabled directory.  The Lua script could be in your root directory
or in a mapped directory.  With this installation done, you could
try:

http://my.server/cgi-bin-directory/cgi/script-dir/script.lua

	I think this might work!
		Tomás