I recently setup a subdomain to run my app as a staging site before pushing changes to the main site. So i setup a subdomain in cpanel, symlinked that the directory to point to a staging directory where i check''d out my rails app. However, when i go to staging.railsapp.com, it times out and says application failed to start properly. I''m not sure what is causing this, but i''m thinking that it has something to do with dispatch.fcgi. Right now in httpd.conf, i have the FastCGIServer pointing to dispatch.fcgi in my main app. Can that dispatch.fcgi file also route requests for my staging subdomain? If not, how can i start another dispatch.fcgi process to route requests for my staging site? Thanks so much for all your kind help. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060426/7cffe24e/attachment.html
can someone tell me if this directive for apache needs to be inside the virtualhost section? <IfModule mod_fastcgi.c> FastcgiIpcDir /tmp/fcgi_ipc/ #AddHandler fastcgi-script .fcgi FastCgiServer /path/to/rails/root/public/dispatch.fcgi -initial-env RAILS_ENV=production -processes 3 -idle-timeout 120 </IfModule> I''m trying to run another version of my app in a staging subdomain for development purposes. If i move this directive (mod_fastcgi.c) inside the <VirtualHost> tag, and add this directive inside the virtualhost for my subdomain (pointing to its own dispatch.fcgi) will this work? Is this recommended? Tearing my hair out, please help... On 4/25/06, Manish Shah <mnshah@gmail.com> wrote:> > I recently setup a subdomain to run my app as a staging site before > pushing changes to the main site. So i setup a subdomain in cpanel, > symlinked that the directory to point to a staging directory where i check''d > out my rails app. > > However, when i go to staging.railsapp.com, it times out and says > application failed to start properly. > > I''m not sure what is causing this, but i''m thinking that it has something > to do with dispatch.fcgi. Right now in httpd.conf, i have the > FastCGIServer pointing to dispatch.fcgi in my main app. Can that > dispatch.fcgi file also route requests for my staging subdomain? > > If not, how can i start another dispatch.fcgi process to route requests > for my staging site? > > Thanks so much for all your kind help. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060426/667cfc12/attachment.html
Manish Shah wrote:> can someone tell me if this directive for apache needs to be inside the > virtualhost section? > > <IfModule mod_fastcgi.c> > FastcgiIpcDir /tmp/fcgi_ipc/ > #AddHandler fastcgi-script .fcgi > FastCgiServer /path/to/rails/root/public/dispatch.fcgi -initial-env > RAILS_ENV=production -processes 3 -idle-timeout 120 > </IfModule> > > I''m trying to run another version of my app in a staging subdomain for > development purposes. If i move this directive (mod_fastcgi.c) inside > the > <VirtualHost> tag, and add this directive inside the virtualhost for my > subdomain (pointing to its own dispatch.fcgi) will this work? > > Is this recommended? Tearing my hair out, please help...Yes, it needs to be inside the vhost, and you''ll need to uncomment the AddHandler section. I''m sorry I''m a little vague on this, I use Apache2.0 and have separate subdirs and config files for separate sites. I suspect you may need to start the fcgis from different locations as well (though again, I''m sketchy). Apache may be clever enough to work out which pids belong to which vhost, but perhaps not. I''d go with: /path/to/prodcopyofrails/root/public/dispatch.fcgi and: /path/to/stagingcopyofrails/root/public/dispatch.fcgi Just in case. Alan -- Posted via http://www.ruby-forum.com/.