Moving away from cgi.pm and deploying multiple psgi apps

43 views
Skip to first unread message

MR J

unread,
Feb 3, 2015, 1:01:35 PM2/3/15
to psgi-...@googlegroups.com
Hi all,

I've read the docs and been through some tutorials on Plack/PSGI and using Perl frameworks but as a junior programmer I'm having a hard time getting my head around this.

I'm trying to drag my employer out of the dark ages that were the mid 90s and move away from cgi.pm.  As an example, I've inherited a web server running Apache with CGI and fastcgi enabled and around 40 cgi applications/scripts - were not using fastcgi.

I've got a few questions:

I want to move to framework based development, using either Dancer or Mojolicious.  As these create PGSI apps can I have an environment set up where I can continue to run all my old legacy cgi scripts via Apache cgi and use Apache to proxy app requests through to Plack to handle PSGI apps? Will that work and is it a sensible thing to do?

Secondly, and I seen a few questions surrounding this, what's the best way to set up multiple apps.  Say for instance my 40 cgi applications I currently have, how do I do that with Plack/PSGI?  Should I create virtual hosts for each app or use unique ports, or should I just set up one app and use the URL to send the request to the relevant controller? I know the latter is incorrect but I'm really confused as you can probably tell.  Additionally do I need implement something like Starman to handle multiple app requests?

I know that Dancer has a dispatcher to deploy apps via Apache cgi but I want to move away from this, I'm just not sure of the right way to keep all my old code running and write new apps using a framework and modern deployment method.

Any help or pointers would be much appreciated.

Reply all
Reply to author
Forward
0 new messages