You have your config.ru set as your binary to execute via FastCGI. Are you sure that's what you want? Do you have a shebang in the config.ru? Have you set the executable bit? On Fri, Sep 2, 2011 at 4:35 AM, coolesting wrote: > Hi, guys, > > My version is ruby 1.9.2, rack 1.2.3, and web server is lighttpd that > is very strange to me how to configure. > > I according to this post { http://devcenter.heroku.com/articles/rack } > to create a pure ruby web application based on rack , and then use > the command 'rackup' to start the web application that is success. > > Here is problem, i want to use the lighttpd to start this project. > Now, how do i configure this rack application. > > My project directory like this : > (root directory) -- /var/www/htdocs/ruby_app/ > config.ru > Gemfile > Gemfile.lock > README > public > tmp > > The public and tmp is empty, other is file, > the config.ru code as the following : > run lambda { |env| [200, {'Content-Type'=>'text/plain'}, > StringIO.new("Hello Ruby APP!\n")] } > > this code is successful to run based on rakeup command in terminal, > > and the fastcgi configuration file as the following: > $HTTP["host"] == "localhost" { > server.document-root = server_root + "/ruby_app" > server.error-handler-404 = server_root + "/ruby_app/public/ > 404.html" > fastcgi.server = ( ".ru" => > (( > "host" => "127.0.0.1", > "port" => 4000, > "bin-path" => server_root + "/ruby_app/config.ru", > "check-local" => "disable", > "max-procs" => 1 > )) > ) > } > > So, i got this error message as the following: > 2011-09-02 01:30:15: (log.c.166) server started > 2011-09-02 01:30:15: (mod_fastcgi.c.1103) the fastcgi-backend /var/www/ > ruby_app/config.ru failed to start: > 2011-09-02 01:30:15: (mod_fastcgi.c.1107) child exited with status 2 / > var/www/ruby_app/config.ru > 2011-09-02 01:30:15: (mod_fastcgi.c.1110) If you're trying to run your > app as a FastCGI backend, make sure you're using the FastCGI-enabled > version. > If this is PHP on Gentoo, add 'fastcgi' to the USE flags. > 2011-09-02 01:30:15: (mod_fastcgi.c.1397) [ERROR]: spawning fcgi > failed. > 2011-09-02 01:30:15: (server.c.945) Configuration of plugins failed. > Going down. > > > Thanks in advance, i very very need the helps. >