[Catalyst] Deployment of many Catalyst sites on the same machine

Ian Docherty catalyst at iandocherty.com
Tue May 15 21:48:44 GMT 2007


Matt S Trout wrote:
> Or you could stuff 'em all in one fcgi handler with something like -
>
> package DummyApp;
>
> use Catalyst;
>
> __PACKAGE__->setup;
>
> my %rev_apps = (
>   MyApp => 'myapp.example.com',
>   MyOtherApp => 'other.example.com,
> );
>
> my %apps = reverse %rev_apps;
>
> foreach my $app (values %apps) {
>   eval "require ${app}" || die $@;
>   $app->engine(__PACKAGE__->engine);
> }
>
> sub handle_request {
>   my ($self, %rest) = @_;
>   my $host = $rest{env}{HTTP_HOST};
>   $apps{$host}->handle_request(%rest);
> }
>   
What would you suggest for multiple instances of the same application?

MyApp  => 'first.example.com'
MyApp => 'second.example.com'

I presume there would be no choice in this case but to use an fcgi 
handler for each one and mod-perl can't be used at all in this case?

Regards
Ian Docherty




More information about the Catalyst mailing list