
cbouvi at free
Feb 9, 2007, 1:40 AM
Post #1 of 3
(532 views)
Permalink
|
|
multi-homed application and proxy configuration
|
|
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 é d r i c B o u v i e r
|