views:

1859

answers:

1

I'm trying to set up Ruby on Rails on lighttpd. The operating system is CentOS, though it may be notable that this is a Xen-based VPS.

The problem occurs something like this:

bash-3.2# /etc/rc.d/init.d/lighttpd start
Starting lighttpd:                                         [  OK  ]
bash-3.2# /etc/rc.d/init.d/lighttpd status
lighttpd dead but pid file exists

The error log reports...

    2009-02-19 01:36:02: (log.c.97) server started  
    2009-02-19 01:36:02: (mod_fastcgi.c.1051) the fastcgi-backend /var/www/rails/ToD  
    o/public/dispatch.fastcgi failed to start:   
    2009-02-19 01:36:02: (mod_fastcgi.c.1055) child exited with status 2 /var/www/ra  
    ils/ToDo/public/dispatch.fastcgi   
    2009-02-19 01:36:02: (mod_fastcgi.c.1058) If you're trying to run PHP as a FastC  
    GI backend, make sure you're using the FastCGI-enabled version.  
    You can find out if it is the right one by executing 'php -v' and it should disp  
    lay '(cgi-fcgi)' in the output, NOT '(cgi)' NOR '(cli)'.  
    For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI  
    #preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add 'fastcgi' to th  
    e USE flags.   
    2009-02-19 01:36:02: (mod_fastcgi.c.1365) [ERROR]: spawning fcgi failed.   
    2009-02-19 01:36:02: (server.c.897) Configuration of plugins failed. Going down.  

mod_fastcgi is enabled.

As far as I can tell, the relevant configuration in the Lighttpd file is

    fastcgi.server =  (".fcgi" => ( "rails" =>
      ( "min-procs" => 1,
        "max-procs" => 2,
        "socket" => "/tmp/lighttpd-fcgi.socket",
        "bin-path" => "/var/www/rails/ToDo/public/dispatch.fastcgi"
      )
    ))

dispatch.fastcgi is set to executable.

I'm not really sure what's going on.

A: 

Does the first line with the path to the Ruby interpreter in dispatch.fastcgi look right?

Volker

ShiDoiSi
Yes, yes it does.