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

Matt S Trout dbix-class at trout.me.uk
Tue May 15 23:00:10 GMT 2007


On Tue, May 15, 2007 at 09:48:44PM +0100, Ian Docherty wrote:
> 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?

Until 5.80, yes. Then we'll have something a little cooler for you :)

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Catalyst mailing list