* Does unicorn support mount the webapp with a prefix like Thin does?
[not found] <AANLkTinDS86owzdni8bgxN4RE=B=ocXAsqzcdH1u93U2@mail.gmail.com>
@ 2011-03-21 7:37 ` Guang-Nan Cheng
2011-03-21 8:34 ` Edho P Arief
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Guang-Nan Cheng @ 2011-03-21 7:37 UTC (permalink / raw)
To: mongrel-unicorn
For example, I have a webapp that handles /welcome.
Does unicorn support to mount the entire webapp at /prefix so request
to /prefix/welcome are handled?
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does unicorn support mount the webapp with a prefix like Thin does?
2011-03-21 7:37 ` Does unicorn support mount the webapp with a prefix like Thin does? Guang-Nan Cheng
@ 2011-03-21 8:34 ` Edho P Arief
2011-03-21 16:14 ` Eric Wong
2011-03-30 18:19 ` Jason Heiss
2 siblings, 0 replies; 4+ messages in thread
From: Edho P Arief @ 2011-03-21 8:34 UTC (permalink / raw)
To: unicorn list
On Mon, Mar 21, 2011 at 2:37 PM, Guang-Nan Cheng <chenggn@gmail.com> wrote:
> For example, I have a webapp that handles /welcome.
>
> Does unicorn support to mount the entire webapp at /prefix so request
> to /prefix/welcome are handled?
yes, it does. I don't remember exactly how though as my main server is
currently offline (it has the config and all). Probably using --path
or something.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does unicorn support mount the webapp with a prefix like Thin does?
2011-03-21 7:37 ` Does unicorn support mount the webapp with a prefix like Thin does? Guang-Nan Cheng
2011-03-21 8:34 ` Edho P Arief
@ 2011-03-21 16:14 ` Eric Wong
2011-03-30 18:19 ` Jason Heiss
2 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2011-03-21 16:14 UTC (permalink / raw)
To: unicorn list; +Cc: Guang-Nan Cheng
Guang-Nan Cheng <chenggn@gmail.com> wrote:
> For example, I have a webapp that handles /welcome.
>
> Does unicorn support to mount the entire webapp at /prefix so request
> to /prefix/welcome are handled?
Yes, all Rack servers that support rackup (config.ru) files can do it:
map "/prefix" do
use Rack::Chunked
run WelcomeApp.new
end
# ...
map "/lobster" do
use Rack::Lint
run Rack::Lobster.new
end
# You can do virtual hosts, too:
map "http://example.com/" do
run ExampleApp.new
end
See the Rack::Builder and Rack::URLMap RDoc for more info.
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does unicorn support mount the webapp with a prefix like Thin does?
2011-03-21 7:37 ` Does unicorn support mount the webapp with a prefix like Thin does? Guang-Nan Cheng
2011-03-21 8:34 ` Edho P Arief
2011-03-21 16:14 ` Eric Wong
@ 2011-03-30 18:19 ` Jason Heiss
2 siblings, 0 replies; 4+ messages in thread
From: Jason Heiss @ 2011-03-30 18:19 UTC (permalink / raw)
To: unicorn list
On Mar 21, 2011, at 12:37 AM, Guang-Nan Cheng wrote:
> For example, I have a webapp that handles /welcome.
>
> Does unicorn support to mount the entire webapp at /prefix so request
> to /prefix/welcome are handled?
If it is a Rails app you can put the following in your unicorn config file:
ENV['RAILS_RELATIVE_URL_ROOT'] = '/prefix'
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-30 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AANLkTinDS86owzdni8bgxN4RE=B=ocXAsqzcdH1u93U2@mail.gmail.com>
2011-03-21 7:37 ` Does unicorn support mount the webapp with a prefix like Thin does? Guang-Nan Cheng
2011-03-21 8:34 ` Edho P Arief
2011-03-21 16:14 ` Eric Wong
2011-03-30 18:19 ` Jason Heiss
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).