Google Groups Home
Help | Sign in
--prefix equivalent?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
François Montel  
View profile
 More options Jan 7, 11:38 am
From: "François Montel" <zeroh...@gmail.com>
Date: Mon, 7 Jan 2008 08:38:02 -0800 (PST)
Local: Mon, Jan 7 2008 11:38 am
Subject: --prefix equivalent?
Thin looks very promising.

Does thin have anything akin to mongrel's --prefix option which, when
combined with Apache's ProxyPass command, allows you to easily run
multiple rails apps on the same domain, each in their own subfolder
(ie, www.domain/myapp1 www.domain/myapp2 etc.?) I find this option to
be extremely useful in mongrel and really the only way I've found to
easily achieve multiple apps on the same domain (at least with Apache;
I don't have the option of running ngnix or other).


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Madrid  
View profile
 More options Jan 7, 12:03 pm
From: "Adrian Madrid" <aemad...@gmail.com>
Date: Mon, 7 Jan 2008 10:03:05 -0700
Local: Mon, Jan 7 2008 12:03 pm
Subject: Re: --prefix equivalent?

Look into MultiURL (?) in Rack. It allows for multiple Rack apps to be run
under the same process.

AEM

On Jan 7, 2008 9:38 AM, François Montel <zeroh...@gmail.com> wrote:

> Thin looks very promising.

> Does thin have anything akin to mongrel's --prefix option which, when
> combined with Apache's ProxyPass command, allows you to easily run
> multiple rails apps on the same domain, each in their own subfolder
> (ie, www.domain/myapp1 www.domain/myapp2 etc.?) I find this option to
> be extremely useful in mongrel and really the only way I've found to
> easily achieve multiple apps on the same domain (at least with Apache;
> I don't have the option of running ngnix or other).

--
Adrian Esteban Madrid
Lead Developer, Prefab Markets
http://www.prefabmarkets.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
macournoyer  
View profile
 More options Jan 7, 12:09 pm
From: macournoyer <macourno...@gmail.com>
Date: Mon, 7 Jan 2008 09:09:02 -0800 (PST)
Local: Mon, Jan 7 2008 12:09 pm
Subject: Re: --prefix equivalent?
Hey François,

Like Adrian mentioned, you can do it w/ a custom Rack config.ru file
and run it w/ rackup (and do almost anything you can dream of w/ that
file).

I added it to the TODO to include --prefix option in the thin script.
If you wanna contribute that'd be a good way :)

On Jan 7, 12:03 pm, "Adrian Madrid" <aemad...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lytol  
View profile
 More options Jan 10, 1:36 am
From: Lytol <Brian.E.Sm...@gmail.com>
Date: Wed, 9 Jan 2008 22:36:01 -0800 (PST)
Local: Thurs, Jan 10 2008 1:36 am
Subject: Re: --prefix equivalent?
As it stands now, the Rails adapter for Rack that is supplied with
Thin will not properly handle SCRIPT_NAME as a prefix for your app.
However, if you add this line to the rack adapter, it seems to work:

Line 48:  ActionController::AbstractRequest.relative_url_root =
env['SCRIPT_NAME'] unless env['SCRIPT_NAME'].blank?
Line 49:  Dispatcher.dispatch(cgi, session_options, response)

That's quick and dirty, and I haven't really tested it too much.  Hope
it helps though.

- Brian

On Jan 7, 9:09 am, macournoyer <macourno...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lytol  
View profile
 More options Jan 10, 1:45 am
From: Lytol <Brian.E.Sm...@gmail.com>
Date: Wed, 9 Jan 2008 22:45:40 -0800 (PST)
Local: Thurs, Jan 10 2008 1:45 am
Subject: Re: --prefix equivalent?
I forgot to mention, that is the solution for Rack (using URLMap); the
Thin start script would still need to be patched to use this (but that
should be trivial).

For example:

map '/myapp' { run Rack::Adapter::Rails.new(:root => 'myapp') }
map '/'      { run Rack::Adapter::Rails.new(:root =>
'my_default_app') }

- Brian

On Jan 9, 10:36 pm, Lytol <Brian.E.Sm...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google