rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
* Configuring rack based on lighttpd for ruby app.
@ 2011-09-02  8:35 coolesting
  2011-09-05  2:27 ` Joshua Ballanco
  0 siblings, 1 reply; 2+ messages in thread
From: coolesting @ 2011-09-02  8:35 UTC (permalink / raw)
  To: Rack Development

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-05  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-02  8:35 Configuring rack based on lighttpd for ruby app coolesting
2011-09-05  2:27 ` Joshua Ballanco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).