[Catalyst] Reusing application on two virtual hosts with mod_perl

Ralph Meek ralph at usrmedia.com
Sun Apr 9 14:50:02 CEST 2006

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

In the second vhost I did the following definition:

    <Location />
	PerSetEnv CATALYST_HOME "/data/wwwroot/myapp2"
        SetHandler          modperl
        PerlResponseHandler Myapp

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 


More information about the Catalyst mailing list