Forum: Ruby Apache + FastCGI + RoR

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 beeplove (Guest)
on 2005-11-17 19:00
(Received via mailing list)
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,
33ec7e55a251c1be8d6febfd929aebbe?d=identicon&s=25 Greg Kujawa (gregarican)
on 2005-11-17 20:13
(Received via mailing list)
Mohammad Khan wrote:

>
>
> 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 might have better results posting this to the Rails mailing list at
http://lists.rubyonrails.org/mailman/listinfo. Ditto for your dupe
message.
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 beeplove (Guest)
on 2005-11-17 20:40
(Received via mailing list)
sorry for  the dupe..
it was a mistake.. i didn't realize gmail really accepted my first
message.
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 beeplove (Guest)
on 2005-11-20 17:00
(Received via mailing list)
Como'n guys,
Say something !!
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 james_b (Guest)
on 2005-11-20 17:13
(Received via mailing list)
Mohammad Khan wrote:
> Como'n guys,
> Say something !!
>
You'll get the fastest, best answers on the Rails mailing list:

http://lists.rubyonrails.org/mailman/listinfo/rails


James
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 straightflush (Guest)
on 2005-12-03 15:59
(Received via mailing list)
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>
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 beeplove (Guest)
on 2005-12-03 16:02
(Received via mailing list)
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,
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 justin (Guest)
on 2005-12-03 16:02
(Received via mailing list)
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/apa...
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
8c786b59665b31d9e43da6c5e6315a4d?d=identicon&s=25 beeplove (Guest)
on 2005-12-03 16:02
(Received via mailing list)
Thanks a lot everybody for your help.

Mohammad
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 justin (Guest)
on 2005-12-03 16:06
(Received via mailing list)
Mohammad Khan wrote:

> Thanks a lot everybody for your help.

Please tell us what works for you - your question was a good one.

regards

    Justin
This topic is locked and can not be replied to.