First question: FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env RAILS_ENV=production Do I need define this for every vhost, or just only one in httpd.conf? If I need to define it once, what should be the path? I am confused as I have dispatch.fcgi in each of the public direcotry of my vhosts. Second question: Can I run 2 of my vost in development envionment, 1 in test envionment and another 2 in production environment? If so, how? Thanks,
Como''n guys, Say something !! On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> First question: > > FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > RAILS_ENV=production > Do I need to define this for every vhost, > or just only once in httpd.conf? > If I need to define it once, what should be the path? > I am confused as I have dispatch.fcgi in each of the public direcotry > of my every vhost. > > > Second question: > > Can I run 2 of my vost in development envionment, 1 in test envionment > and another 2 in production environment? > If so, how? > > Thanks, >
you cant put FastCGI directives in the VHOST. You have to set options globally i believe. if you have multiple rails vhosts do something like the following globally: <IfModule mod_fastcgi.c> FastCgiIpcDir logs/fcgi AddHandler fastcgi-script .fcgi FastCgiConfig -idle-timeout 60 -minProcesses 15 </IfModule> On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Como''n guys, > Say something !! > > > > > On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > First question: > > > > FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > > RAILS_ENV=production > > Do I need to define this for every vhost, > > or just only once in httpd.conf? > > If I need to define it once, what should be the path? > > I am confused as I have dispatch.fcgi in each of the public direcotry > > of my every vhost. > > > > > > Second question: > > > > Can I run 2 of my vost in development envionment, 1 in test envionment > > and another 2 in production environment? > > If so, how? > > > > Thanks, > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Is that mean, I will have to use same dispatch.fcgi for every vhost and i will have to use same envinment for every vhost? Please correct me, if I am wrong. Thanks, On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you cant put FastCGI directives in the VHOST. You have to set options > globally i believe. if you have multiple rails vhosts do something > like the following globally: > > <IfModule mod_fastcgi.c> > FastCgiIpcDir logs/fcgi > AddHandler fastcgi-script .fcgi > FastCgiConfig -idle-timeout 60 -minProcesses 15 > </IfModule> > > On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Como''n guys, > > Say something !! > > > > > > > > > > On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > First question: > > > > > > FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > > > RAILS_ENV=production > > > Do I need to define this for every vhost, > > > or just only once in httpd.conf? > > > If I need to define it once, what should be the path? > > > I am confused as I have dispatch.fcgi in each of the public direcotry > > > of my every vhost. > > > > > > > > > Second question: > > > > > > Can I run 2 of my vost in development envionment, 1 in test envionment > > > and another 2 in production environment? > > > If so, how? > > > > > > Thanks, > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
---------- Forwarded message ---------- From: Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Date: Nov 20, 2005 11:14 AM Subject: Re: [Rails] Re: Apache + FastCGI + RoR To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Is that mean, I will have to use same dispatch.fcgi for every vhost and i will have to use same envinment for every vhost? Please correct me, if I am wrong. Thanks, On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you cant put FastCGI directives in the VHOST. You have to set options > globally i believe. if you have multiple rails vhosts do something > like the following globally: > > <IfModule mod_fastcgi.c> > FastCgiIpcDir logs/fcgi > AddHandler fastcgi-script .fcgi > FastCgiConfig -idle-timeout 60 -minProcesses 15 > </IfModule> > > On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Como''n guys, > > Say something !! > > > > > > > > > > On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > First question: > > > > > > FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > > > RAILS_ENV=production > > > Do I need to define this for every vhost, > > > or just only once in httpd.conf? > > > If I need to define it once, what should be the path? > > > I am confused as I have dispatch.fcgi in each of the public direcotry > > > of my every vhost. > > > > > > > > > Second question: > > > > > > Can I run 2 of my vost in development envionment, 1 in test envionment > > > and another 2 in production environment? > > > If so, how? > > > > > > Thanks, > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
i dont know anyway to override the settings inside a VHOST, so yes the mod_fcgi settings are for every rails application that apache points at. I dont know how lighttpd does it, you may be able to use that as an alternative to do what you want. adam On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ---------- Forwarded message ---------- > From: Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Date: Nov 20, 2005 11:14 AM > Subject: Re: [Rails] Re: Apache + FastCGI + RoR > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Is that mean, I will have to use same dispatch.fcgi for every vhost > and i will have to use same envinment for every vhost? > > Please correct me, if I am wrong. > > Thanks, > > > On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > you cant put FastCGI directives in the VHOST. You have to set options > > globally i believe. if you have multiple rails vhosts do something > > like the following globally: > > > > <IfModule mod_fastcgi.c> > > FastCgiIpcDir logs/fcgi > > AddHandler fastcgi-script .fcgi > > FastCgiConfig -idle-timeout 60 -minProcesses 15 > > </IfModule> > > > > On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Como''n guys, > > > Say something !! > > > > > > > > > > > > > > > On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > First question: > > > > > > > > FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > > > > RAILS_ENV=production > > > > Do I need to define this for every vhost, > > > > or just only once in httpd.conf? > > > > If I need to define it once, what should be the path? > > > > I am confused as I have dispatch.fcgi in each of the public direcotry > > > > of my every vhost. > > > > > > > > > > > > Second question: > > > > > > > > Can I run 2 of my vost in development envionment, 1 in test envionment > > > > and another 2 in production environment? > > > > If so, how? > > > > > > > > Thanks, > > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Mohammad Khan wrote:> Is that mean, I will have to use same dispatch.fcgi for every vhost > and i will have to use same envinment for every vhost? > > Please correct me, if I am wrong.According to Scott Laird''s blog: http://scottstuff.net/blog/articles/2005/07/20/apache-tuning-for-rails-and-fastcgi you should have a FastCgiServer line for each application. See comments 2 and 8 on the article, and Scott''s responses. Example (from comment 2) FastCgiServer /rails_app_1/dispatch.fcgi \ -idle-timeout 120 \ -initial-env RAILS_ENV=production \ -processes 10 FastCgiServer /rails_app_2/dispatch.fcgi \ -idle-timeout 120 \ -initial-env RAILS_ENV=production \ -processes 10 (note that the numbers of statically allocated processes here are high - Scott says 2 should be fine unless you are dealing with heavy traffic) regards Justin> > Thanks, > > > On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>you cant put FastCGI directives in the VHOST. You have to set options >>globally i believe. if you have multiple rails vhosts do something >>like the following globally: >> >><IfModule mod_fastcgi.c> >>FastCgiIpcDir logs/fcgi >>AddHandler fastcgi-script .fcgi >>FastCgiConfig -idle-timeout 60 -minProcesses 15 >></IfModule> >> >>On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>>Como''n guys, >>>Say something !! >>> >>> >>> >>> >>>On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>>First question: >>>> >>>>FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env >>>>RAILS_ENV=production >>>>Do I need to define this for every vhost, >>>>or just only once in httpd.conf? >>>>If I need to define it once, what should be the path? >>>>I am confused as I have dispatch.fcgi in each of the public direcotry >>>>of my every vhost. >>>> >>>> >>>>Second question: >>>> >>>>Can I run 2 of my vost in development envionment, 1 in test envionment >>>>and another 2 in production environment? >>>>If so, how? >>>> >>>>Thanks, >>>> >>> >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >
I am not sure why are you saying so. On 11/20/05, Martin Larsson <morg-rJ8A01d+sojLoDKTGw+V6w@public.gmane.org> wrote:> Stop spamming the ruby/rails lists! > You won''t get answer faster by irritating the listmembers > > Mohammad Khan wrote: > > >---------- Forwarded message ---------- > >From: Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >Date: Nov 20, 2005 11:14 AM > >Subject: Re: [Rails] Re: Apache + FastCGI + RoR > >To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > > > >Is that mean, I will have to use same dispatch.fcgi for every vhost > >and i will have to use same envinment for every vhost? > > > >Please correct me, if I am wrong. > > > >Thanks, > > > > > >On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > >>you cant put FastCGI directives in the VHOST. You have to set options > >>globally i believe. if you have multiple rails vhosts do something > >>like the following globally: > >> > >><IfModule mod_fastcgi.c> > >>FastCgiIpcDir logs/fcgi > >>AddHandler fastcgi-script .fcgi > >>FastCgiConfig -idle-timeout 60 -minProcesses 15 > >></IfModule> > >> > >>On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >> > >>>Como''n guys, > >>>Say something !! > >>> > >>> > >>> > >>> > >>>On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> > >>> > >>>>First question: > >>>> > >>>>FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > >>>>RAILS_ENV=production > >>>>Do I need to define this for every vhost, > >>>>or just only once in httpd.conf? > >>>>If I need to define it once, what should be the path? > >>>>I am confused as I have dispatch.fcgi in each of the public direcotry > >>>>of my every vhost. > >>>> > >>>> > >>>>Second question: > >>>> > >>>>Can I run 2 of my vost in development envionment, 1 in test envionment > >>>>and another 2 in production environment? > >>>>If so, how? > >>>> > >>>>Thanks, > >>>> > >>>> > >>>> > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >>> > >>> > >>_______________________________________________ > >>Rails mailing list > >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > >> > >_______________________________________________ > >Rails mailing list > >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > >
Thanks a lot everybody for your help. Mohammad On 11/21/05, Justin Forder <justin-zSfPWr5aQuznITO/+xaoB7VCufUGDwFn@public.gmane.org> wrote:> Mohammad Khan wrote: > > > Is that mean, I will have to use same dispatch.fcgi for every vhost > > and i will have to use same envinment for every vhost? > > > > Please correct me, if I am wrong. > > According to Scott Laird''s blog: > http://scottstuff.net/blog/articles/2005/07/20/apache-tuning-for-rails-and-fastcgi > you should have a FastCgiServer line for each application. > > See comments 2 and 8 on the article, and Scott''s responses. > > Example (from comment 2) > > FastCgiServer /rails_app_1/dispatch.fcgi \ > -idle-timeout 120 \ > -initial-env RAILS_ENV=production \ > -processes 10 > > FastCgiServer /rails_app_2/dispatch.fcgi \ > -idle-timeout 120 \ > -initial-env RAILS_ENV=production \ > -processes 10 > > (note that the numbers of statically allocated processes here are high - > Scott says 2 should be fine unless you are dealing with heavy traffic) > > regards > > Justin > > > > > > Thanks, > > > > > > On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >>you cant put FastCGI directives in the VHOST. You have to set options > >>globally i believe. if you have multiple rails vhosts do something > >>like the following globally: > >> > >><IfModule mod_fastcgi.c> > >>FastCgiIpcDir logs/fcgi > >>AddHandler fastcgi-script .fcgi > >>FastCgiConfig -idle-timeout 60 -minProcesses 15 > >></IfModule> > >> > >>On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >>>Como''n guys, > >>>Say something !! > >>> > >>> > >>> > >>> > >>>On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> > >>>>First question: > >>>> > >>>>FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > >>>>RAILS_ENV=production > >>>>Do I need to define this for every vhost, > >>>>or just only once in httpd.conf? > >>>>If I need to define it once, what should be the path? > >>>>I am confused as I have dispatch.fcgi in each of the public direcotry > >>>>of my every vhost. > >>>> > >>>> > >>>>Second question: > >>>> > >>>>Can I run 2 of my vost in development envionment, 1 in test envionment > >>>>and another 2 in production environment? > >>>>If so, how? > >>>> > >>>>Thanks, > >>>> > >>> > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >> > >>_______________________________________________ > >>Rails mailing list > >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I am going to consider myself as dumb, I don''t need to ignore you. Thanks, Mohammad On 11/21/05, Martin Larsson <morg-rJ8A01d+sojLoDKTGw+V6w@public.gmane.org> wrote:> well, then consider yourself dumb > > but i''m only a lurker at the list, so ignore me if you want to > > Mohammad Khan wrote: > > >I am not sure why are you saying so. > > > > > > > >On 11/20/05, Martin Larsson <morg-rJ8A01d+sojLoDKTGw+V6w@public.gmane.org> wrote: > > > > > >>Stop spamming the ruby/rails lists! > >>You won''t get answer faster by irritating the listmembers > >> > >>Mohammad Khan wrote: > >> > >> > >> > >>>---------- Forwarded message ---------- > >>>From: Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >>>Date: Nov 20, 2005 11:14 AM > >>>Subject: Re: [Rails] Re: Apache + FastCGI + RoR > >>>To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>> > >>> > >>>Is that mean, I will have to use same dispatch.fcgi for every vhost > >>>and i will have to use same envinment for every vhost? > >>> > >>>Please correct me, if I am wrong. > >>> > >>>Thanks, > >>> > >>> > >>>On 11/20/05, Adam Denenberg <straightflush-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> > >>> > >>> > >>> > >>>>you cant put FastCGI directives in the VHOST. You have to set options > >>>>globally i believe. if you have multiple rails vhosts do something > >>>>like the following globally: > >>>> > >>>><IfModule mod_fastcgi.c> > >>>>FastCgiIpcDir logs/fcgi > >>>>AddHandler fastcgi-script .fcgi > >>>>FastCgiConfig -idle-timeout 60 -minProcesses 15 > >>>></IfModule> > >>>> > >>>>On 11/20/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>> > >>>> > >>>> > >>>> > >>>>>Como''n guys, > >>>>>Say something !! > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>On 11/17/05, Mohammad Khan <beeplove-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>First question: > >>>>>> > >>>>>>FastCgiServer /users/foo/rails/public/dispatch.fcgi -initial-env > >>>>>>RAILS_ENV=production > >>>>>>Do I need to define this for every vhost, > >>>>>>or just only once in httpd.conf? > >>>>>>If I need to define it once, what should be the path? > >>>>>>I am confused as I have dispatch.fcgi in each of the public direcotry > >>>>>>of my every vhost. > >>>>>> > >>>>>> > >>>>>>Second question: > >>>>>> > >>>>>>Can I run 2 of my vost in development envionment, 1 in test envionment > >>>>>>and another 2 in production environment? > >>>>>>If so, how? > >>>>>> > >>>>>>Thanks, > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>_______________________________________________ > >>>>>Rails mailing list > >>>>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>_______________________________________________ > >>>>Rails mailing list > >>>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>>> > >>>> > >>>> > >>>> > >>>> > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >>> > >>> > >>> > >>> >