Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Serving multiple Plack apps

by Your Mother (Archbishop)
on Feb 10, 2015 at 17:16 UTC ( [id://1116195]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Serving multiple Plack apps
in thread Serving multiple Plack apps

Vhosts have nothing to do with anything here.

There are many ways to deploy this stuff but you cannot do anything beyond the plain CGI you already have without some modification to your webserver layer. If you think this is going to be a problem, then you’re stuck with CGI (which isn’t all bad, the ease of deployment is a perk). So, first things, first: ask your webadmin/team if they will allow a directive to run an app through apache. Again there are are a couple of different ways to do this, FastCGIExternalServer probably being the easiest (well, the most flexible anyway, otherwise you need to restart the web server to pick up application changes) for apache.

If you do that, you can maybe run your whole CGI directory as a single psgi executable, like in my example. Some CGI code takes so many liberties that it can’t be run this way without Herculean efforts. It’s easy enough to try it as a test server, like in my example, and test it on an open port on your host. Your firewall might block it but most hosts have a lot of high ports open, like the default 5000 in the example. You would just substitute the real hostname for localhost. Note, running a live server, even a test server on a high port, can be risky (machine load, locks, security). You should never do it on a production box and make sure you have everyone’s blessing/approval before they find out what you’re up to when you accidentally lock the box with a runaway while() or something.

Replies are listed 'Best First'.
Re^4: Serving multiple Plack apps
by soundX (Acolyte) on Feb 10, 2015 at 18:10 UTC
    Brilliant. Thanks for the pointers YM, that's exactly what I needed to get me going. I'm just trying out your example on a test server.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1116195]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-28 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found