Paul
2013-Jun-14 18:53 UTC
Setting up a rails app in a relative path (using Apache and Passenger)
Hi, This seems like it should be a common problem, but I haven''t been able to google for the right terms, evidently... I''m trying to set up my rails app, not to the base domain name, but to a relative path. That is, the server already hosts an app at the domain, and I want to add a rails app. So, mydomain.com already exists and is a PHP app. I want mydomain.com/railsto point to my rails app. It looks like this case was handled in Rails 2 with relative_url_root, but that was deprecated a long time ago. What is the standard way to do this now? TIA, Paul -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABceSpDvPHmjfcaQJNOKP8TD675EVNTfOC3aG-Cvuk%2B97oVMtw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jun-18 03:21 UTC
Re: Setting up a rails app in a relative path (using Apache and Passenger)
Paul <paul-mzPrHiy5csbYtjvyW6yDsg@public.gmane.org> wrote:> This seems like it should be a common problem, but I haven''t been able to google for the right terms, evidently...It is.> I''m trying to set up my rails app, not to the base domain name, but to a relative path. That is, the server already hosts an app at the domain, > and I want to add a rails app. > > So, mydomain.com already exists and is a PHP app. I want mydomain.com/rails to point to my rails app. > > It looks like this case was handled in Rails 2 with relative_url_root, but that was deprecated a long time ago. What is the standard way to do > this now?My opinion is that you should not put apps underneath other app''s directories. This can cause some significant problems. My suggestion is to use a subdomain like rails.mydomain.com instead, and set up your server to serve up the rails app from a different directory structure than (www.)mydomain.com. However, if you do go the subdirectory way, you need configure your server to drive your rails app from that path. You can use passenger with either method under either apache or nginx. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51bfd240.464e320a.1142.5907%40mx.google.com. For more options, visit https://groups.google.com/groups/opt_out.