[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua scripts under uwsgi through CGI?
- From: Gilles Ganault <gilles.ganault@...>
- Date: Wed, 26 Feb 2014 02:03:48 +0100
Hello
Since uwsgi's wiki and examples/ directory don't actually show how
to do this, I was wondering if someone would know how to run Lua
scripts through CGI with uwsgi as the sole web server (ie. not as
back-end to front-end web servers like Nginx or Lighttpd)?
This is for an appliance, and I don't need a full-fledged web
framework; A simple CGI script will do the job to handle forms.
Using the following configuration...
=========
[uwsgi]
http=:8000
http-modifier1=9
uid=nobody
gid=nogroup
check-static=/tmp/uwsgi-2.0/www
cgi=/tmp/uwsgi-2.0/cgi
cgi-allowed-ext=.lua
cgi-helper=.lua=lua
=========
... uwsgi returns the following error when calling cgi.lua:
=========
invalid CGI output !!!
[pid: 3501|app: -1|req: -1/2] 192.168.0.1 () {32 vars in 558 bytes}
[Wed Feb 26 01:51:09 2014] GET /cgi.lua => generated 0 bytes in 9
msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
=========
I assume it takes more than "print("hello")" to run a CGI script. Must
I use eg. CGILua or something similar?
Thank you.