> On Thu, 6 Feb 2014 17:39:09 +0100, "Roberto De Ioris" > <[email protected]> wrote: >>> i suppose you are referring to cgi mode. >>> >>> Be sure to build a uWSGI binary with cgi support (make cgi) or to load >>> the >>> cgi plugin in your binary, then you can map extensions/uri/paths to >>> scripts >>> >>> For example: >>> >>> [uwsgi] >>> ... >>> cgi = /var/www >>> cgi-allowed-ext = .lua >>> cgi-helper = .lua=lua >>> >>> the helper directive avoids you to need to set execution permission on >>> cgi >>> script >>> >>> eventually you can use routing too: >>> >>> route = \.lua$ cgi:/var/www/$(PATH_INFO) >>> >>> >> >>oops, here is ${PATH_INFO} not $(PATH_INFO) ;) > > Thanks for the tip. If CGI is the easiest way to run a Lua script to > handle infos from a form, it looks good. > > The documentation uses the following to build a CGI-capable uwsgi... > curl http://uwsgi.it/install | bash -s cgi /tmp/uwsgi > > ... while I use this to build a new uwsgi: > UWSGICONFIG_LUAPC=luajit > make lua > > What's the right syntax to compile LuaJit + CGI? > > Thank you. > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
cgi mode does not embed an interpreter. It basically spawns a new process for every request that closes itself at the end of the request. With the cgi-helper you tell the plugin which command to execute for running .lua script (and here you pass the path to luajit). uWSGI cgi plugin supports "acceleration" for cgis (it is a pretty unique feature), so it can preload the luajit engine, but this is pretty advanced. We can speak about it after you have successfully deployed your stack :) -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
