【发布时间】:2012-09-03 03:35:12
【问题描述】:
我将 starman 用于我的 web 应用程序。 Apache Web 服务器侦听端口 8080。
我想在starman 中将'/request' 之类的请求重写到这个Apache 网络服务器。我试图找到一些 pm,但我找到了一些可以帮助我的例子。
【问题讨论】:
-
这似乎是错误的做法。 Apache 代理到 starman 是更常见的情况。
我将 starman 用于我的 web 应用程序。 Apache Web 服务器侦听端口 8080。
我想在starman 中将'/request' 之类的请求重写到这个Apache 网络服务器。我试图找到一些 pm,但我找到了一些可以帮助我的例子。
【问题讨论】:
Plack::App::Proxy 允许您代理到 app.psgi 中的另一个 Web 服务器。改编自概要:
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;
};
【讨论】: