【问题标题】:How to proxy a starman request to Apache?如何将 Starman 请求代理到 Apache?
【发布时间】:2012-09-03 03:35:12
【问题描述】:

我将 starman 用于我的 web 应用程序。 Apache Web 服务器侦听端口 8080。 我想在starman 中将'/request' 之类的请求重写到这个Apache 网络服务器。我试图找到一些 pm,但我找到了一些可以帮助我的例子。

【问题讨论】:

  • 这似乎是错误的做法。 Apache 代理到 starman 是更常见的情况。

标签: perl psgi starman


【解决方案1】:

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

【讨论】:

  • 你是对的。也许一开始,我想错了。当然,我们可以使用 nginx 来解决这个问题。总之,tks~
猜你喜欢
  • 2023-01-11
  • 1970-01-01
  • 1970-01-01
  • 2012-04-09
  • 1970-01-01
  • 1970-01-01
  • 2011-06-27
  • 2017-06-29
  • 1970-01-01
相关资源
最近更新 更多