[Catalyst] Configuration based on hostname
Mihai Bazon
mihai at bazon.net
Sun Jul 12 07:29:12 GMT 2009
Kieren Diment <diment at gmail.com> wrote:
>
> On 12/07/2009, at 4:35 PM, Mihai Bazon wrote:
>
> > Hi folks,
> >
> > I think this was raised before but I don't remember to have seen a
> > satisfactory answer. Someone please point me into the right
> > direction.
> >
> > I want to deploy a Catalyst app that will be used to serve multiple
> > websites. The platform will be Apache2 (prefork) + mod_perl2. I want
> > Catalyst to read a different configuration file, based on the host
> > name.
> > Each virtual host will have its own database (configured in .conf) and
> > its own "root" directory, but other than this, all the Perl modules
> > are
> > the same.
> >
> > I know this can be done with FastCGI by launching a different process
> > for each host, but I'm interested in a mod_perl solution. Is it
> > feasible?
>
>
> One of the limitations of mod_perl is that you can't run the same app
> more than once on the same server. Sorry.
Let me clarify that. I don't want to run the app more than once. I
just want the application to switch configuration file and database
depending on the hostname that each particular request targets.
I've done this a zillion times with plain mod_perl, I just don't know
what's the proper route with Catalyst.
Cheers,
-Mihai
More information about the Catalyst
mailing list