Bug #1079

Error (mod_fastcgi.c.989) launching lighttpd with Ruby as FastCGI Backend

Added by Anonymous over 13 years ago. Updated about 11 years ago.

Target version:


I get the following error when I try to launch lighttpd with Ruby as FastCGI Backend on windows PC:
(Note: Although the message says "execve failed for: C:\work\public\dispatch.fcgi No such file or directory", the file 'C:\work\public\dispatch.fcgi' exists.)

C:\work>2007-02-07 14:53:01: (mod_fastcgi.c.989) execve failed for: C:\work\public\dispatch.fcgi No such file or directory
2007-02-07 14:53:01: (mod_fastcgi.c.1015) the fastcgi-backend C:\work\public\dispatch.fcgi failed to start:
2007-02-07 14:53:01: (mod_fastcgi.c.1019) child exited with status 2 C:\work\public\dispatch.fcgi
2007-02-07 14:53:01: (mod_fastcgi.c.1022) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check
2007-02-07 14:53:01: (mod_fastcgi.c.1027) If this is PHP on Gentoo add fastcgi to the USE flags
2007-02-07 14:53:01: (mod_fastcgi.c.1314) [[ERROR]]: spawning fcgi failed.
2007-02-07 14:53:01: (server.c.702) Configuration of plugins failed. Going down.

I tried launching the server from within "C:\work\public" by changing all references to dispatch.fcgi to relative path, but no luck.

My lighttpd.conf file looks like:

server.port = 4000
server.bind = "" 

# server.event-handler = "freebsd-kqueue" # needed on OS X
server.modules = ( "mod_rewrite", "mod_fastcgi" )
url.rewrite = ( "^/$" => "index.html", "^([[^.]]+)$" => "$1.html" )

server.error-handler-404 = "C:\work\public\dispatch.fcgi" 
server.document-root = "C:\work\public" 
server.errorlog = "C:\work\log\server.log" 
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )

fastcgi.server = ( ".fcgi" =>
( "" =>
"min-procs" => 10,
"max-procs" => 10,
"socket" => "C:\work\application.fcgi.socket",
"bin-path" => "C:\work\public\dispatch.fcgi",
"bin-environment" => ( "RAILS_ENV" => "development" )

-- Ashwin


Updated by Anonymous over 13 years ago

Even I had similar problem with my python application. My configuraion had the following in config file.

bin-path => "/path/to/" 

And this was creating problems. I fixed it by changing bin-path to the following.

bin-path => "/usr/local/bin/python /path/to/" 

-- anand


Updated by Anonymous over 13 years ago

This seems to happen when the shebang line of the dispatcher script doesn't reference to an existing interpreter.

Find the corresponding first line in the dispatch.fcgi file, e.g.:


and test if the interpreter is to be found there. If not, change it to the right path, e.g.:


The error message for wrong shebang lines is generally a bit misleading, as it suggests that the script file itself is not found - even if it's only the referenced interpreter that is missing.

-- Sebastian Burkhart


Updated by stbuehler about 12 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

Updated by stbuehler almost 12 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom