Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems to me that it will be more maintainable to keep separate functions of my site in separate FCGI binaries. What I want is for requests like these:

To be redirected to the appropriate files:


So, in my lighttpd.conf file, I would need something like this:

fastcgi.server =
( ".fcgi" =>
  (( "bin-path" => "/var/fcgi",
     "socket" => "tmp/fcgi.sock",
     "check-local" => "disable"

Or maybe it would have to be more like this:

fastcgi.server = 
( "funcA.fcgi" =>
  (( "bin-path" => "/var/fcgi/funcA.fcgi",
     "socket" => "tmp/fcgi.sock",
     "check-local" => "disable"
( "funcB.fcgi" =>
  (( "bin-path" => "/var/fcgi/funcB.fcgi",
     "socket" => "tmp/fcgi.sock",
     "check-local" => "disable"

Or am I maybe missing something else altogether? I can only get lighttpd to start when there is a single binary being pointed to.

EDIT: To make sure I'm being clear: what I need is for a request like to invoke /var/fcgi/x.fcgi, and likewise a request to to invoke /var/fcgi/y.fcgi. It seems to be like this should be pretty straightforward, but I can't get a lighttpd configuration that makes this happen.

Also, I'm not using anything interpreted. These are compiled C++ binaries using the fcgi_stdio.h header.

Would I perhaps need to use mod_rewrite?

share|improve this question
up vote 1 down vote accepted

So it looks to me like what I want to do is impossible, or at least not provided for under FCGI. When you invoke, you're not starting thing1.fcgi; that has already been done. What you're doing is sending a request to the infinitely-running FCGI process that you write, which almost certainly has a infinite loop right at the heart of it, waiting for requests. This is just the nature of FCGI, and a major distinction from the earlier CGI.

Not a hard question to answer, once you understand how FCGI works. I guess I was just wishing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.