0

I use starman for my webapp. Apache web server listens on port 8080. I want to rewrite some request like '/request' to this Apache web-server in starman. I try to find some pm, but I found few examples to help me.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
AilesFX
  • 81
  • 4
  • This seems like the wrong way to do it. Apache proxying to starman is the much more common case. – MkV Sep 03 '12 at 05:47

1 Answers1

1

Plack::App::Proxy lets you proxy to another web server in your app.psgi. Modified from the synopsis:

use Plack::Builder;

# proxy all requests for /request to 127.0.0.1:8080
builder {
    mount "/request" => Plack::App::Proxy->new(remote => "http://127.0.0.1:8080")->to_app;
};
MkV
  • 3,046
  • 22
  • 16
  • you are right.Perhaps at the beginning, I think in a wrong way. And of course, we can use nginx to solve this problem. anyway,tks~ – AilesFX Sep 03 '12 at 05:57