[Catalyst] multi-homed application and proxy configuration

Cédric Bouvier cbouvi at free.fr
Fri Feb 9 09:40:39 GMT 2007


I'm trying to achieve the following setup (with apache+mod_perl)
- one server in front: http://front/myapp, serving the static content
  and proxying for several instances in the back-end.
- several instances of the application in the back-end, but each with a
  different purpose. i.e., the user knows what instance he wants to
  reach, and says so in the URL:
  - http://front/myapp/A/...
  - http://front/myapp/B/...

The aim is to be able to split the load on different machines, if need
be. However, currently, there is no such need, so A and B would be
hosted on the same machine, possibly even the front-end machine.

So I'd need to install one Catalyst app that can be reached either as
/myapp, /myapp/A or /myapp/B. And it should somehow "know" through which
path it has been accessed (because it's behaviour will be slightly
different whether it's A or B).

I already tried with mod_rewrite and [P], but then uri_for() still
refers to /myapp on the back-end server (not /myapp/A on the front-end).
I know I read everywhere that under mod_perl, it should Just Work, well
it bloody well doesn't! I have to resign to messing around with
$c->req->base, but it's not dynamic: I can set it to a string read from
the config, but I couldn't figure out how to determine what the original
request was aimed at (was it /A? /B?).

I guess I failed to understand something in mod_proxy or Catalyst
configuration, but I also failed at finding the documentation that
explains how to do that. If someone can point me in the right
direction... Please?

-- =

C =E9 d r i c   B o u v i e r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070209/f368=
0640/attachment.pgp


More information about the Catalyst mailing list