How to run together: PSGI and PHP?
I have Perl/PSGI application (running under pure perl Starman server). Now, for some reason need run one PHP application too ;(, so (probably) need Apache2. Questions:
Plus:
the server is behind my home NAT router. Internal server has address: 192.168.1.10, from the outside, ofc, the router have correct internet address. I have redirected all traffic
routerIP:80 -> 192.168.1.10:80
Ps: I don't need optimize performance, the server is only for home/demo/testing purpose.
EDIT: Now, in another similar situation I checked CPAN again and based on @rawhide's answer I found the Plack::App::PHPCGI module. Works great - it is really cool testing php apps under plackup... ;)
You can execute it as CGI (fork+exec) either using Plack::App::CGIBin
or using WrapCGI directly
my $rawapp = Plack::App::WrapCGI->new(script => "rawhide.php" , execute => 1 )->to_app;
builder {
mount "/rawhide" => $rawapp ;
};
If rawhide.php has no shebang, you'd use /usr/bin/php /path/to/rawhide.php