开发者

Run native binary CGI on lighttpd

I'm trying to set up lighttpd to run binary CGI app (not PHP script or smth, but a binary file, compiled from C++ source). I actually have

开发者_如何学Python
server.modules = (
...
"mod_cgi"
...
)

uncommented, have myApp.exe in htdocs/app, and also

cgi.assign = ( "myApp.exe" => "myApp.exe" )

Then, to make all the stuff work by accessing, say, http://localhost:8080/app/myApp.exe?p=a&..., I had to put an empty myApp.exe in lighttpd root folder (where the server's exe is). It's actually strange and sucks, and also not all CGIs can work that way. Applying these actions to another CGI app (that works perfectly on properly tuned Apache) gave no success.

What am I doing wrong?


The docs: http://redmine.lighttpd.net/wiki/1/Docs:ModCGI
I've made a test with a tcl script as cgi and this was my working config:

cgi.assign =  ( "" => "/usr/bin/tclsh" )
index-file.names = ("lighttd_test.tcl")

The cgi.assign allows you to specify file extensions to be handled by specific applications. This example means: Any filetype will be opened through /usr/bin/tclsh. Since my index-file is a tcl script, I get the content which I put through the script's STDOUT.
In case you want to run a binary executable this is the place to specify it.
Maybe this link provides some more info about binary cgi for you: http://redmine.lighttpd.net/issues/1256

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜