Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Plack and multiple domains

by Anonymous Monk
on Feb 17, 2012 at 19:21 UTC ( #954598=note: print w/ replies, xml ) Need Help??


in reply to Plack and multiple domains

I think its just a matter of using

--listen localhost --listen localpost --listen localfoobar
and then having some Plack::App::URLMap dispatch apps based on Host: header ( PSGI SERVER_NAME or HTTP_HOST var)
$urlmap->map( "http://localhost/" => $app1); $urlmap->map( "http://localpost/" => $app2); $urlmap->map( "http://localfoobar/" => $app3);

I'm not sure you need the multiple --listen options if all the hostnames bind to the same IP


Comment on Re: Plack and multiple domains
Select or Download Code
Replies are listed 'Best First'.
Re^2: Plack and multiple domains
by srchulo (Sexton) on May 17, 2014 at 20:02 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2015-07-29 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (266 votes), past polls