How to proxy a starman request to Apache?

397 Views Asked by At

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.

1

There are 1 best solutions below

1
On

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;
};