From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.109.203 with SMTP id k11cs45018qcp; Sun, 4 Sep 2011 19:27:28 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCOCkpKnzHBCM55DzBBoE5ndPfA@googlegroups.com designates 10.150.252.28 as permitted sender) client-ip=10.150.252.28; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCOCkpKnzHBCM55DzBBoE5ndPfA@googlegroups.com designates 10.150.252.28 as permitted sender) smtp.mail=rack-devel+bncCOCkpKnzHBCM55DzBBoE5ndPfA@googlegroups.com; dkim=pass header.i=rack-devel+bncCOCkpKnzHBCM55DzBBoE5ndPfA@googlegroups.com Received: from mr.google.com ([10.150.252.28]) by 10.150.252.28 with SMTP id z28mr1509802ybh.19.1315189647594 (num_hops = 1); Sun, 04 Sep 2011 19:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:date :message-id:subject:from:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=YMf44IsnJy5BxJ4lRG47LOlAYQvyJpfM3ZF6Muqe4PU=; b=rAeElc4GGl1wpvd5Hx5b3PEk7pvvzpzg9DAQ665vbTURZ/+LAUiQWq2K/G7Mrn9qWT +pT7vylls9mfRH7ct3Z/YzhrQYkW8e/1ymfSxrj3lOVAxoo5nvVoc51GCTDxLCP1EuNL 8numzCN3nKpD42x7kRy5hiKG5MwF+3NsIX36Y= Received: by 10.150.252.28 with SMTP id z28mr443715ybh.19.1315189644969; Sun, 04 Sep 2011 19:27:24 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.100.233.7 with SMTP id f7ls7236299anh.7.gmail; Sun, 04 Sep 2011 19:27:24 -0700 (PDT) Received: by 10.236.177.73 with SMTP id c49mr17015934yhm.0.1315189644262; Sun, 04 Sep 2011 19:27:24 -0700 (PDT) Received: by 10.236.177.73 with SMTP id c49mr17015933yhm.0.1315189644247; Sun, 04 Sep 2011 19:27:24 -0700 (PDT) Received: from mail-gw0-f50.google.com (mail-gw0-f50.google.com [74.125.83.50]) by gmr-mx.google.com with ESMTPS id w7si874636yhl.2.2011.09.04.19.27.23 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Sep 2011 19:27:23 -0700 (PDT) Received-SPF: pass (google.com: domain of jballanc@gmail.com designates 74.125.83.50 as permitted sender) client-ip=74.125.83.50; Received: by gwj16 with SMTP id 16so2928887gwj.37 for ; Sun, 04 Sep 2011 19:27:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.9.106 with SMTP id 70mr15256782yhs.105.1315189643024; Sun, 04 Sep 2011 19:27:23 -0700 (PDT) Received: by 10.236.95.48 with HTTP; Sun, 4 Sep 2011 19:27:22 -0700 (PDT) In-Reply-To: <555d0e41-06a2-4ed3-a69c-d6283eb4b468@j4g2000prh.googlegroups.com> References: <555d0e41-06a2-4ed3-a69c-d6283eb4b468@j4g2000prh.googlegroups.com> Date: Sun, 4 Sep 2011 22:27:22 -0400 Message-ID: Subject: Re: Configuring rack based on lighttpd for ruby app. From: Joshua Ballanco To: rack-devel@googlegroups.com X-Original-Sender: jballanc@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jballanc@gmail.com designates 74.125.83.50 as permitted sender) smtp.mail=jballanc@gmail.com; dkim=pass (test mode) header.i=@gmail.com Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: multipart/alternative; boundary=20cf3036387b7c1a5704ac287335 --20cf3036387b7c1a5704ac287335 Content-Type: text/plain; charset=UTF-8 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. > --20cf3036387b7c1a5704ac287335 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 <= span dir=3D"ltr"><coolesting@gma= il.com> 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 =C2=A0pure ruby web application based on rack , and then use the command 'rackup' to start the web application that is success.<= br>
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 th= e following :
run lambda { |env| [200, {'Content-Type'=3D>'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"] =3D=3D "localhost" {
=C2=A0 =C2=A0 =C2=A0 =C2=A0server.document-root =C2=A0=3D server_root + &q= uot;/ruby_app"
=C2=A0 =C2=A0 =C2=A0 =C2=A0server.error-handler-404 =3D server_root + &quo= t;/ruby_app/public/
404.html"
=C2=A0 =C2=A0 =C2=A0 =C2=A0fastcgi.server =3D ( ".ru" =3D> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"host" = =3D> "127.0.0.1",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"port" = =3D> 4000,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"bin-path"= ; =3D> server_root + "/ruby_app/config.ru",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"check-local&q= uot; =3D> "disable",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"max-procs&quo= t; =3D> 1
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0))
=C2=A0 =C2=A0 =C2=A0 =C2=A0)
}

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 faile= d 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<= br> 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.

--20cf3036387b7c1a5704ac287335--