Hi all, "Agile Web Development with Ruby on Rails" describes the setup for Apache 1.x with mod_fastcgi etc. but the example contains only the config for ONE Rails application. How do I run multiple Rails apps on the same server using fcgi? Regards, Robert -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Robert Spielmann wrote:> Hi all, > > "Agile Web Development with Ruby on Rails" describes the setup for > Apache 1.x with mod_fastcgi etc. but the example contains only the > config for ONE Rails application. How do I run multiple Rails apps on > the same server using fcgi?Are you having any luck with ONE rails application with apache+fcgi? I had no end of trouble getting that to work reliably. And that seems to be the experience that a lot of people have. If you can''t switch to lighttpd+fcgi, I''d recommend using mongrel or SCGI with apache. -matthew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I''m still trying, actually, I follow the instructions in the book :) Will research your alternatives though. Thanks :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I had minor issues getting an app running with apache+fcgi, mostly just deployment stuff: shebang lines were wrong in the dispatch.* files, file permissions were wrong on those files after deployment, etc. Since I got my deploy script fine-tuned there haven''t been any problems. My app is for a single client, load is about 50 users per day, and fcgi handles it fine. -- foobario On 10/9/06, Matthew Isleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Robert Spielmann wrote: > > Hi all, > > > > "Agile Web Development with Ruby on Rails" describes the setup for > > Apache 1.x with mod_fastcgi etc. but the example contains only the > > config for ONE Rails application. How do I run multiple Rails apps on > > the same server using fcgi? > > Are you having any luck with ONE rails application with apache+fcgi? I > had no end of trouble getting that to work reliably. And that seems to > be the experience that a lot of people have. If you can''t switch to > lighttpd+fcgi, I''d recommend using mongrel or SCGI with apache. > > -matthew > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
I have done this with Apache 2. I''m writing a guide on setting up fastCGI or SCGI on Windows XP. If that is your OS then maybe it will help: http://www.writely.com/View?docid=acj4fmm2gr83_3gx8pf2&revision=acj4fmm2gr83_3gx8pf2:302 If not I have many links listed at the end for sites detailing how to setup these dispatchers. I might be able to help with a specific question on the setup. If you have any suggestions on improving my guide let me know :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Robert Spielmann wrote:> Hi all, > > "Agile Web Development with Ruby on Rails" describes the setup for > Apache 1.x with mod_fastcgi etc. but the example contains only the > config for ONE Rails application. How do I run multiple Rails apps on > the same server using fcgi? > > Regards, > RobertI realize you want a way to do this in Apache, but we''re a Lighttpd shop. Maybe our Lighttpd configuration can point you in the right direction however. And help anyone else reading this who''s wondering how to do it in Lighty. We have two apps running on the same box, a production app and a training app. Here''s the relevant stuff cut out of lighttpd.conf: # Set up a separate virtual host for the training app. We have a separate # subdomain, ''training'', to catch requests for this app. $HTTP["host"] =~ "training\.yourcompany\.org" { server.document-root = "/usr/local/bin/training/public" server.error-handler-404 = "/training.fcgi" } # Set up the FCGI servers. First the training app; then everything else # falls through to the production app. fastcgi.server = ( "/training" => ( "localhost-7100" => ( "host" => "127.0.0.1", "port" => 7100, "bin-environment" => ("RAILS_ENV" => "training") ), "localhost-7101" => ( "host" => "127.0.0.1", "port" => 7101, "bin-environment" => ("RAILS_ENV" => "training") ) ), ".fcgi" => ( "localhost-7000" => ( "host" => "127.0.0.1", "port" => 7000, "bin-environment" => ("RAILS_ENV" => "production") ), "localhost-7001" => ( "host" => "127.0.0.1", "port" => 7001, "bin-environment" => ("RAILS_ENV" => "production") ) ) ) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Oops, forgot a few lines at the very top: # Set the public directory for the production application, # which is the default for this domain. server.document-root = "/usr/local/bin/production/public" server.error-handler-404 = "/dispatch.fcgi" # Set up a separate virtual host for the training app. # We have a separate subdomain, ''training'', to catch # requests for this app. Set a different application path # for this app, and copy dispatch.fcgi to training.fcgi in # its public directory. $HTTP["host"] =~ "training\.yourcompany\.org" { server.document-root = "/usr/local/bin/training/public" server.error-handler-404 = "/training.fcgi" } # Set up the FCGI servers. First the training app; then # everything else falls through to the production app. fastcgi.server = ( "/training" => ( "localhost-7100" => ( "host" => "127.0.0.1", "port" => 7100, "bin-environment" => ("RAILS_ENV" => "training") ), "localhost-7101" => ( "host" => "127.0.0.1", "port" => 7101, "bin-environment" => ("RAILS_ENV" => "training") ) ), ".fcgi" => ( "localhost-7000" => ( "host" => "127.0.0.1", "port" => 7000, "bin-environment" => ("RAILS_ENV" => "production") ), "localhost-7001" => ( "host" => "127.0.0.1", "port" => 7001, "bin-environment" => ("RAILS_ENV" => "production") ) ) ) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---