<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Obrigado a todos que me responderam.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Bom, realmente a questão não é só "fazer" o plack "falar" com o php-fpm.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>Eles precisam compartilhar parametros, assim como o nginx faz com o php-fpm.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new
 york', times, serif; background-color: transparent; font-style: normal;"><span>Vou dar mais um estudada aqui.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>A ideia é montar um ferramente para gestão de ambiente de desenvolvimento (configuração, profiling, depuração, instalação de scripts, deploy, etc...)</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent;
 font-style: normal;">Eu conheço ferramentas como capistrano, mas ainda não quero usar.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span>[]'s</span></div><div></div><div> </div><div>=pod</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;">Rafael C. da Silveira</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: arial, helvetica, clean, sans-serif; background-color: transparent; font-style: normal;"><span style="font-weight:bold;">Analista Desenvolvedor.</span></div><div style="color: rgb(0, 0, 0); font-size: 13px;
 background-color: transparent; font-style: normal; font-family: arial, helvetica, clean, sans-serif;"><a rel="nofollow" target="_blank" href="http://www.linkedin.com/profile/view?id=203095528" style="font-family: arial, helvetica, clean, sans-serif;">LinkedIn</a> - <a rel="nofollow" target="_blank" href="http://github.com/xshifty" style="font-family: arial, helvetica, clean, sans-serif;">Github</a> - <a rel="nofollow" target="_blank" href="http://rosalind.info/users/xshifty/">Rosalind.info</a></div><div style="color: rgb(0, 0, 0); font-size: 13px; background-color: transparent; font-style: normal; font-family: arial, helvetica, clean, sans-serif;">=cut</div><div><br></div>  <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span
 style="font-weight:bold;">De:</span></b> Gabriel Andrade <gabiruh@gmail.com><br> <b><span style="font-weight: bold;">Para:</span></b> saopaulo-pm@mail.pm.org <br> <b><span style="font-weight: bold;">Enviadas:</span></b> Quinta-feira, 5 de Setembro de 2013 16:49<br> <b><span style="font-weight: bold;">Assunto:</span></b> Re: [SP-pm] Perl Plack/Starman com php-fpm<br> </font> </div> <div class="y_msg_container"><br><br>On Sep 5, 2013, at 1:00 PM, Rafael Silveira <<a ymailto="mailto:dev.silveira@yahoo.com" href="mailto:dev.silveira@yahoo.com">dev.silveira@yahoo.com</a>> wrote:<br><br>> Senhores mongers, boa tarde<br>> <br>> Surgiu uma dúvida em minha cachola.<br>> Existe alguma forma de subir um servidor http utilizando o Plack, e quando um determinada url for utilizada, ele redirecionar as requisições para o php-fpm (fastcgi)?<br>> Alguém ai já fez isso ou tem alguma dica?<br>> <br>> Estava vendo algo sobre
 Plack::App::FCGIDispatcher. Mas não consegui fazer ele rodar.<br><br>Acredito que realmente não iria funcionar se você tentou rodar diretamente<br>do exemplo descrito na sessão SYNOPSIS.<br><br>Acho que ficou faltando você mapear as urls corretas.<br><br>> Se alguém tiver um exemplo, seria muito bom.<br>> Lembrando que não estou usando arquivo .sock para me conectar, uso o hosted mode (127.0.0.1:9000 é onde o meu php-fpm está "escutando").<br><br>Veja se algo assim funciona:<br><br><br>=> app.psgi<br><br>    use strict;<br>    use warnings;<br><br>    use Plack::Builder;<br>    use Plack::App::FCGIDispatcher;<br>    use MinhaAppPerl;<br><br><br>    my $app = MinhaAppPerl->to_app;<br>    my $medo = Plack::App::FCGIDispatcher->new({port => 9000})->to_app;<br><br>    builder {<br>      mount '/'  => $app;<br>   
   mount '/outra_url' => $medo;<br>    };<br><br><br>Depois, no terminal:<br><br>  $ plackup app.psgi<br>  HTTP::Server::PSGI: Accepting connections at <a href="http://0.0.0.0:5000/" target="_blank">http://0:5000/</a><br>  $ curl <a href="http://0.0.0.0:5000/outra_url" target="_blank">http://0:5000/outra_url</a><br><br><br><br><br><br><br>=begin disclaimer<br>   Sao Paulo Perl Mongers: <a href="http://sao-paulo.pm.org/" target="_blank">http://sao-paulo.pm.org/</a><br> SaoPaulo-pm mailing list: <a ymailto="mailto:SaoPaulo-pm@pm.org" href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br> L<<a href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a>><br>=end disclaimer<br><br></div> </div> </div>  </div></body></html>