Rails running as sub domain: Help please

I need to set up Rails as a sub-domain to another application. Are
there
any steps I need to take. Not sure how to get started.
Please help

TIA
Stuart


i did not really workt with subdomain in rails. Why do you need actualy
a subdomain?
If you are working with more rails applications you could start it on
the same server using diffrent ports.

I don’t know if this was the answer to your question. Is that what you
ment?

Handling subdomains or other protocols (e.g. https) in rails isn’t
unsophisticated at all. But Dan W. recently released a rails plugin
called «request routing» to simplify these solutions.

To install the plugin type the following command:

ruby script/plugin install
http://svn.vivabit.net/external/rubylibs/request_routing

The properties to differentiate are listed below:
-subdomain
-domain
-method
-port
-remote_ip
-content_type
-accepts
-request_uri
-protocol

i found this post on a forum

Tux, thank you. I did look at Dan’s plugin and I believe it will help.
The reason why I need Rails as a subdomain, is that another application
(non
Rails) is the front end (so to speak).
However Rails is doing all of the database work.
So, spcifically, what I think I’m lacking on in knowledge -
1- Does Rails sit in a subdirectory of the main app, like a subdomain
typically would ?
2- Any special configurations for Rails ?
3- How about the app that will be making the calls, do I need some kind
of
redirects or just making the call to the subdomain should be
enough ?

TIA
Stuart

On 11/11/06, tux [email protected] wrote:

i found this post on a forum


If all you are trying to do is make:

www.foo.com => your first app
bar.foo.com => your second app

You have several choices. If your first app is PHP (which I believe you
said
it was), then let Apache serve it directly using mod_php, and proxy a
port
to your Rails app on a different port. Then set up Mongrel or Lighty to
listen on that second port.

If they are both Rails apps, it’s a snap: Use Pound to resolve the
subdomains and proxy them to Mongrel packs running on different ports.

HTH

Dark A. wrote:


View this message in context:
http://www.nabble.com/-Rails--Rails-running-as-sub-domain%3A-Help-please-tf2612550.html#a7294860
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

On 11/11/06, s.ross [email protected] wrote:

it was), then let Apache serve it directly using mod_php, and proxy a port
to your Rails app on a different port. Then set up Mongrel or Lighty to
listen on that second port.

Excellent, great information, very much appreciated.

If they are both Rails apps, it’s a snap: Use Pound to resolve the

subdomains and proxy them to Mongrel packs running on different ports.

I wish it was just Rails, but good information as well. There is much
better
information around on multiple Rails apps , then Rails + some other
language.
I saw the Pound stuff up on the wiki.

Stuart

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs