Hi, it just reciently occured to me to join the mailing lists for ruby on rails, and I am therefore effectively a newbie. TLDR? skip to the last line: I work for a corporation whose internal web applications are becoming unmaintainable and therefore obsolete. I, and a coworker, are pushing ROR ( ruby on rails ) for our new internal web standard. I realize that ROR is a complex system and may only be used for the largest of applications, but non-the-less the desire to use ruby in a corporate environment is still there. I am a huge open source fan, and therefore its very surprizing that I have a job in any corporation. I have, to my best ability, researched the implimentation requirements for ROR, and I assume that apache (either 2 or 1.3), and the fcgi mod are the best options for the environment. Personally, I perfer lighty but, unfortunately, the same "problems" with one server and ROR still apply with any web server. The problem that I am encountering is that, in order to use one web server and fcgi, I must add a mod fcgi entry for every ROR application, or in other words, for every dispatch.fcgi. To me, this is unscalable. Alternatively, I can hack together a dispatch.fcgi. Note that I would like to stay away from the maintinence of hacking any of the rails source. One or two files, however, may be acceptable. My question is this: Is there a best way to have one dispatch.fcgi for a lot of ROR applications? Thank you, - travis michel
Hogan, Brian P.
2005-Oct-27 13:31 UTC
RE: multiple rails applications from one dispatch.fcgi?
"The problem that I am encountering is that, in order to use one web server and fcgi, I must add a mod fcgi entry for every ROR application, or in other words, for every dispatch.fcgi. To me, this is unscalable. Alternatively, I can hack together a dispatch.fcgi. Note that I would like to stay away from the maintinence of hacking any of the rails source. One or two files, however, may be acceptable. " Nope... Doesn''t work that way. Take a look at the actual setup for fcgi... You''ll find it''s easier than you think. http://wiki.rubyonrails.org/rails/pages/HowtoDeployMoreThanOneRailsAppOn OneMachine This might help too... http://wiki.rubyonrails.org/rails/pages/HowToSetTheBaseURLsOfYourRailsAp ps -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of travis michel Sent: Thursday, October 27, 2005 5:13 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [rails] multiple rails applications from one dispatch.fcgi? Hi, it just reciently occured to me to join the mailing lists for ruby on rails, and I am therefore effectively a newbie. TLDR? skip to the last line: I work for a corporation whose internal web applications are becoming unmaintainable and therefore obsolete. I, and a coworker, are pushing ROR ( ruby on rails ) for our new internal web standard. I realize that ROR is a complex system and may only be used for the largest of applications, but non-the-less the desire to use ruby in a corporate environment is still there. I am a huge open source fan, and therefore its very surprizing that I have a job in any corporation. I have, to my best ability, researched the implimentation requirements for ROR, and I assume that apache (either 2 or 1.3), and the fcgi mod are the best options for the environment. Personally, I perfer lighty but, unfortunately, the same "problems" with one server and ROR still apply with any web server. The problem that I am encountering is that, in order to use one web server and fcgi, I must add a mod fcgi entry for every ROR application, or in other words, for every dispatch.fcgi. To me, this is unscalable. Alternatively, I can hack together a dispatch.fcgi. Note that I would like to stay away from the maintinence of hacking any of the rails source. One or two files, however, may be acceptable. My question is this: Is there a best way to have one dispatch.fcgi for a lot of ROR applications? Thank you, - travis michel _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ezra Zygmuntowicz
2005-Oct-27 14:44 UTC
Re: multiple rails applications from one dispatch.fcgi?
On Oct 27, 2005, at 3:13 AM, travis michel wrote:> Hi, it just reciently occured to me to join the mailing lists for ruby > on rails, and I am therefore effectively a newbie. TLDR? skip to the > last line: I work for a corporation whose internal web applications > are becoming unmaintainable and therefore obsolete. I, and a > coworker, are pushing ROR ( ruby on rails ) for our new internal web > standard. I realize that ROR is a complex system and may only be used > for the largest of applications, but non-the-less the desire to use > ruby in a corporate environment is still there. I am a huge open > source fan, and therefore its very surprizing that I have a job in any > corporation. > > I have, to my best ability, researched the implimentation requirements > for ROR, and I assume that apache (either 2 or 1.3), and the fcgi mod > are the best options for the environment. Personally, I perfer lighty > but, unfortunately, the same "problems" with one server and ROR still > apply with any web server. > > The problem that I am encountering is that, in order to use one web > server and fcgi, I must add a mod fcgi entry for every ROR > application, or in other words, for every dispatch.fcgi. To me, this > is unscalable. Alternatively, I can hack together a dispatch.fcgi. > Note that I would like to stay away from the maintinence of hacking > any of the rails source. One or two files, however, may be > acceptable. > > My question is this: > Is there a best way to have one dispatch.fcgi for a lot of ROR > applications? > > Thank you, > - travis michelHey Travis- Rails dispatch.fcgi does not work that way and I would imagine that what you are proposing would be much more of a pain then just setting up proper fcgi''s. One way to run many rails apps with the least pain as far as shared resources is IMHO to run apache as a front end and a single instance of lighttpd/fcgi for each rails app. Lighttpd is great for your rails applications, I find it much easier to configure and much less temperamental than apache/fcgi. You can do this with apaches mod_proxy something like this: <VirtualHost example.com> ServerName example.com ServerAlias www. example.com ProxyPass / http://example.com:81/ ProxyPassReverse / http://example.com:81/ </VirtualHost> And the you run each rails app with its own lighttpd/fcgi instance and create on of these vhosts, each with an individual port to themselves. Lighttpd takes up very little resources and is fast. Also this way when you need to take down and restart one of your rails apps you can do so without affecting all the other apps on the server. You can just leave apache running and restart lighty. Take a look at the site in my sig, that site runs rails and runs on just lighttpd/fcgi by itself because the whole box is dedicated to the one rails app. Cheers- -Ezra Zygmuntowicz WebMaster Yakima Herald-Republic Newspaper http://yakimaherald.com ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org 509-577-7732
Obie Fernandez
2005-Oct-27 14:49 UTC
Re: multiple rails applications from one dispatch.fcgi?
>I realize that ROR is a complex system and may only be usedfor the largest of applications [...] Anyone else have a "huh!?" moment at that statement? :-) I wonder how he got that impression -- if it''s due to something in the way the documentation is presented we should probably look into fixing it.
[OT] I would agree with that Obie. The last thing I think of one someone mentions rails is large and complex. Dont get me wrong, its not that the internals of rails aren''t complex, but using it is far from when compared to other solutions. [/OT] -Nick On 10/27/05, Obie Fernandez <obiefernandez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> >I realize that ROR is a complex system and may only be used > for the largest of applications [...] > > Anyone else have a "huh!?" moment at that statement? :-) > > I wonder how he got that impression -- if it''s due to something in the > way the documentation is presented we should probably look into fixing > it. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
travis michel
2005-Oct-27 18:59 UTC
Re: multiple rails applications from one dispatch.fcgi?
Nick, Obie,> >I realize that ROR is a complex system and may only be used > for the largest of applications [...] > > Anyone else have a "huh!?" moment at that statement? :-)I''m sorry, I can see how that statement caused a "huh!?" moment... I was unclear. ROR is really easy to use, and the documentation is good! Thank you for the help guys. It looks like im doing something contrived, and therefore seems "complex". Ezra, It did not occur to me to use two web servers. I will look into this. thank you! - travis _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails