n Wed, Jul 14, 2010 at 2:21 PM, Thijs Koerselman <thijskoersel...@gmail.com> wrote: >> >> This seems to indicate to me that whatever launcher script you are >> using has #! /usr/bin/env wsapi.cgi and is unable to find the >> wsapi.cgi script to execute hello.lua. Your web server environment is >> going to have a different environment and won't have access to your >> wsapi.cgi script unless you tell it where it is. > > Yes that's what I meant with the next part. I edited hello.lua to > point to the absolute path of wsapi.cgi, and then I'm getting into > trouble with luarocks I think:
Ah, sorry about that, that's what I get for not fully reading your original message. Without a full error message in your apache log it's a bit hard to tell what's going wrong. When luarocks reports that it's unable to find a module, it gives you a full listing of the paths that were searched and that would give you a better indication of what's going on. >> >>> Next I edited hello.lua to point to the absolute path of the wsapi.cgi >>> in my luarocks bin folder. The file is found, but there seems to be a >>> problem with the lua paths: >>> >>> [Wed Jul 14 12:34:57 2010] [error] [client ::1] /usr/local/bin/lua: >>> /usr/local/share/lua/5.1/luarocks/require.lua:250: module >>> 'wsapi.common' not found: >>> >>> If I execute wsapi.cgi with hello.lua directly from the commandline it >>> works ok: >>> >>> $ wsapi.cgi ~/Sites/luatesting/hello.lua >>> Status: 200 OK >>> Content-type: text/html >>> >>> <html><body><p>Hello Wsapi!</p><p>PATH_INFO: /</p><p>SCRIPT_NAME: >>> </p></body></html> >>> >>> >>> If I check the lua path variables in wsapi.cgi they seem to be the >>> same as my user environment variables: >>> >>> LUA_PATH="/usr/local/share/lua/5.1/?.lua;/usr/local/etc/luarocks/?.lua;/Users/thijskoerselman/Documents/Projects/IM3I/svn/bintje/audiomodule/luamodules/?.lua;;$LUA_PATH" >>> LUA_CPATH="./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;$LUA_CPATH" >>> export LUA_PATH LUA_CPATH >>> exec "/usr/local/bin/lua" -lluarocks.require >>> "/Users/thijskoerselman/.luarocks//rocks/wsapi/1.3.4-1/bin/wsapi.cgi" >>> "$@" >>> >>> >>> I have no idea what the problem is here. How can I make Apache work >>> with my LuaRocks modules? >>> >>> Cheers, >>> Thijs >>> > > _______________________________________________ > Kepler-Project mailing list > Kepler-Project@lists.luaforge.net > http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project > http://www.keplerproject.org/ > _______________________________________________ Kepler-Project mailing list Kepler-Project@lists.luaforge.net http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project http://www.keplerproject.org/