Anyone figured out how to get rails/fastcgi to run on Resin. I assume it would be similar to PHP, which there are directions here: http://www.caucho.com/resin-3.0/thirdparty/php.xtp One thing that confuses me is that it wants a server address: <server-address>localhost:8002</server-address> Apparently you start the php process, like this: php -b 8002 And then the PHP process listens on that port. Is that how you would do it with rails? If so, what process do you start? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/006b23e9/attachment.html
not entirely familiar with resin, but rails as an app server listens on 3000 for requests. This can be overridden with -p to script/server.. i.e., script/server -p 8002 -e production or something like that adam On 1/14/06, Paul Barry <mail@paulbarry.com> wrote:> Anyone figured out how to get rails/fastcgi to run on Resin. > > I assume it would be similar to PHP, which there are directions here: > > http://www.caucho.com/resin-3.0/thirdparty/php.xtp > > One thing that confuses me is that it wants a server address: > > <server-address>localhost:8002</server-address> > > Apparently you start the php process, like this: > > php -b 8002 > > And then the PHP process listens on that port. Is that how you would do it > with rails? If so, what process do you start? > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Isn''t that WEBrick that listens in port 3000? I thought WEBrick was only for development? On 1/14/06, Adam Denenberg <straightflush@gmail.com> wrote:> > not entirely familiar with resin, but rails as an app server listens > on 3000 for requests. This can be overridden with -p to > script/server.. > > i.e., script/server -p 8002 -e production > > or something like that > > adam > > On 1/14/06, Paul Barry <mail@paulbarry.com> wrote: > > Anyone figured out how to get rails/fastcgi to run on Resin. > > > > I assume it would be similar to PHP, which there are directions here: > > > > http://www.caucho.com/resin-3.0/thirdparty/php.xtp > > > > One thing that confuses me is that it wants a server address: > > > > <server-address>localhost:8002</server-address> > > > > Apparently you start the php process, like this: > > > > php -b 8002 > > > > And then the PHP process listens on that port. Is that how you would do > it > > with rails? If so, what process do you start? > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/04a419a4/attachment-0001.html
On 14.1.2006, at 22.29, Paul Barry wrote:> Isn''t that WEBrick that listens in port 3000? I thought WEBrick > was only for development?Rails nowadays uses lighttpd if it''s found on the system. However, 3000 is still the default port unless your lighty config file says otherwise. //jarkko -- Jarkko Laine http://jlaine.net http://odesign.fi -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2363 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/1b4049c3/smime.bin
So in order to use FastCGI with Resin, you would have to use lighttpd as well? On 1/14/06, Jarkko Laine <jarkko@jlaine.net> wrote:> > On 14.1.2006, at 22.29, Paul Barry wrote: > > > Isn''t that WEBrick that listens in port 3000? I thought WEBrick > > was only for development? > > Rails nowadays uses lighttpd if it''s found on the system. However, > 3000 is still the default port unless your lighty config file says > otherwise. > > //jarkko > > -- > Jarkko Laine > http://jlaine.net > http://odesign.fi > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/41b14b37/attachment.html
Paul Barry wrote:> Anyone figured out how to get rails/fastcgi to run on Resin. > > I assume it would be similar to PHP, which there are directions here: > > http://www.caucho.com/resin-3.0/thirdparty/php.xtp > > One thing that confuses me is that it wants a server address: > > <server-address>localhost:8002</server-address> > > Apparently you start the php process, like this: > > php -b 8002 > > And then the PHP process listens on that port. Is that how you would do > it with rails? If so, what process do you start?The equivalent of the php command is probably: script/spawner --port=8002 --instances=1 This will start a Rails FCGI server on port 8002. You''ll need to have lighttpd around to run this command though. The script uses the spawn-fcgi command that is included with lighttpd. Phil -- Philip Ross http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
Adam Denenberg wrote:> not entirely familiar with resin, but rails as an app server listens > on 3000 for requests. This can be overridden with -p to > script/server.. > > i.e., script/server -p 8002 -e production > > or something like thatNot for FCGI, you don''t. There''s no need to fire up WEBRick (the process that listens on port 3000) or lighttpd in that case. You want the dispatch.fcgi script in the public/ directory of the app. There is an example parallel installation of FCGI PHP and rails on lighttpd here, which may help: http://textsnippets.com/posts/show/299 There''s an example of configuring rails fcgi to listen on a port rather than a socket here: http://defendem.com/read/chapter/6 But I don''t know how current that is... -- Alex
Even if you get Resin to talk to your Rails app through FastCGI, from looking at the Resin code, you are limited to a single FastCGI process per app, since Resin only takes a single host/port, and Rails only runs with a single process per port. I think Resin''s FastCGI support is designed for minimal use of functionality you can''t get any other way, not for full scale app hosting. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Alex Young Sent: Sunday, January 15, 2006 1:37 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Rails on Resin Adam Denenberg wrote:> not entirely familiar with resin, but rails as an app server listens > on 3000 for requests. This can be overridden with -p to > script/server.. > > i.e., script/server -p 8002 -e production > > or something like thatNot for FCGI, you don''t. There''s no need to fire up WEBRick (the process that listens on port 3000) or lighttpd in that case. You want the dispatch.fcgi script in the public/ directory of the app. There is an example parallel installation of FCGI PHP and rails on lighttpd here, which may help: http://textsnippets.com/posts/show/299 There''s an example of configuring rails fcgi to listen on a port rather than a socket here: http://defendem.com/read/chapter/6 But I don''t know how current that is... -- Alex _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails