Darren Garvey | 17 Jun 20:40

[fastcgi] Using FastCGI with C/C++

Hi all,

I've tried to get some FastCGI code of mine working with lighttpd several times in the past, but always without luck. I've been trying again recently and I'm really stuck, having exhausted as much of google as I have time to wade through.

The aim is to be able to get lighty to start up the relevant process given a name in a special directory.
ie.
a request for /fcgi/echo    -> starts up the 'echo' app in /usr/lib/fcgi-bin
a request for /fcgi/whatever -> starts up /usr/lib/fcgi-bin/whatever
etc...

As it stands I'm struggling to figure out how lighty actually deals with fastcgi stuff in general - I've briefly looked at the source, but not for long enough. ;-) The above use-case seems to be moot in the face of things like FastCGI-PHP, but hopefully it's not impossible.

I've attached the relevant part of my config that is as close to working as possible. With that, lighty starts up the processes as expected, but doesn't forward anything to them. Directing my browser to /fcgi/linux_fcgi just gives an error 404.

I'm working on both linux and windows (with the latest stable lighty, sometimes with SVN lighty) , although linux is my focus for now since I hear windows fastcgi support is very fickle (is this true?). I'm implementing a FastCGI library, so it should work with unix sockets/named pipes and tcp, both locally and remotely. AFAICT, the library works fine once it's connected to the server (it works with Apache), but connecting is proving to be a pain. Any pointers here would be very much appreciated.

Apologies for the lack of concrete details, I can provide any extra information that would be helpful.

Cheers,

Darren

Attachment (10-fastcgi.conf): application/octet-stream, 1106 bytes

Gmane