[Mongrel] Multiple rails apps with Mongrel

Zed Shaw
2006-09-08T16:27:25Z

On Fri, 2006-09-08 at 10:26 -0500, zer0halo wrote:
>

>
> Zed, first off, thanks for writing/releasing mongrel. Terrific app --
> filled a dire need.
>
> I had read the How-To page and thought of the --prefix option, but I
> have the latest mongrel gem install (just did and update now to be
> sure) and it doesn''t recognize the --prefix option or list i with
> start -h.
>

Yeah, you need the pre-release, which was going to get released as
official but I decided to try and fix up the naming clashes for people
first.

You can install the pre-release with:

gem install mongrel --source=http://mongrel.rubyforge.org/releases/

And it''s not built for win32 yet.

> If I can get the --prefix command working (I guess with the next
> release?), what does Apache need in that case? To summarize this
> thread, I''m trying to run multiple rails apps, each running their
own
> instance of mongrel (or cluster), on the same domain, ie.
> http://domain/app1, http://domain/app2. I''ve been told to use
> ProxyPass in Apache to redirect from the mongrel port (ie, 3000) to
> port 80, but as you can see from the thread, it''s not working.

I believe that you just have to make sure the URI path
(/app2/controller/action) gets passed back to the mongrel server as-is.
Don''t rewrite it, just route it.

If you''re not sure what apache is sending mongrel, run one mongrel with
-B and go look at the log/mongrel_debug/files.log and
log/mongrel_debug/rails.log for clues.


--
Zed A. Shaw
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.