[Catalyst] Reusing application on two virtual hosts with mod_perl

Zbigniew Lukasiak zzbbyy at gmail.com
Sun Apr 9 15:04:21 CEST 2006


Hi,

How about having a config file with:

www.first.domain.com => template1,
www.second.domain.com => template2,
...
?

That is using the address - available in $c->req->base - to choose the
templates.

-- Zbyszek

On 4/9/06, Ralph Meek <ralph at usrmedia.com> wrote:
> I have written several Catalyst applications that run as virtrual hosts on a
> server with mod_perl. That all works very well. Now I need to make a new
> application that is very similar to an application I already have so I was
> wondering if it is possible to reuse the existing module. What I tried to do
> is the following:
>
> The existing application is defined as follows in the apache config:
>
>     <Location />
>         SetHandler          modperl
>         PerlResponseHandler Myapp
>     </Location>
>
>
> In the second vhost I did the following definition:
>
>
>     <Location />
>         PerSetEnv CATALYST_HOME "/data/wwwroot/myapp2"
>         SetHandler          modperl
>         PerlResponseHandler Myapp
>     </Location>
>
> This way I was hoping to have the same application with just a different home
> dir (templates, static files, etc) but somehow Catalyst doesn't pick up the
> specified CATALYST_HOME. Even if I have only one application, it doesn't seem
> to pick it up.
>
> How can I use the same Catalyst application on two vhosts with different
> templates?
>
> Ralph
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>


More information about the Catalyst mailing list