Proxying to a Unix domain name should work with mod_proxy with Apache 2.4.7 and Starman .
Another approach is to run various PSGI applications in one process. To do this, I use something similar to the following wrapper application:
use strict;
use warnings;
use lib qw(
/path/to/app1
/path/to/app2
/path/to/app3
);
use Plack::Builder;
use Plack::Util;
sub load_psgi_in_dir {
my ($dir, $psgi) = @_;
my $app = Plack::Util::load_psgi("$dir/$psgi");
return sub {
chdir($dir);
return $app->(@_);
};
}
builder {
mount 'http://app1.com/' => load_psgi_in_dir(
'/path/to/app1',
'app1.psgi',
);
mount 'http://app2.com/' => load_psgi_in_dir(
'/path/to/app2',
'app2.psgi',
);
mount 'http://app3.com/' => load_psgi_in_dir(
'/path/to/app3',
'app3.psgi',
);
};
, , , . , .
, , ( ).