1

所以我有一个用 ruby​​ 编写的自定义代理,它使用 mongrel 来处理一些相当复杂的缓存逻辑。这对 http 和 ftp 请求都很有效,但是由于 mongrel 不是为处理 https 请求而设计的,所以我希望将整个事情放在 apache 前面,并使用 ProxyRemote 命令传递给 mongrel 以处理 https 请求。

这类事情很容易通过 apache 中的 ProxyPass 和 ProxyPassReverse 命令镜像某些站点目录结构,但我看不到使用 ProxyRemote 的方法。

问题是 mongrel 不处理为建立安全请求而发出的 CONNECT 请求。因此,虽然我能够在代理本身内处理 https 请求,但实际上不支持直接将代理与 https 请求一起使用。

似乎最简单的解决方案是让 apache 处理 https 请求,然后简单地将 http 请求本身(减去 CONNECT)传递给 mongrel 并让它适当地处理它并将其返回给 apache,然后返回给客户端。

所以我的问题是,有没有办法让 ProxyRemote 的工作方式与 ProxyPass 处理 HTTP 请求的方式相同(即将未加密的请求传递给 mongrel)?

4

2 回答 2

1

Just use ProxyPass and ProxyPassReverse, the connection between your reverse proxy (apache) and your mongrel will see normal plain http :), no magic necessary (especially not CONNECT, afaik thats only possbile for forward proxies, but I'm not sure).

于 2009-07-01T23:18:16.190 回答
0

哼,你试过吗?

我一直在使用 apache 来执行 https 并使用旧的默认 .htaccess mod_rewrite 规则传递请求。

于 2008-12-08T20:40:36.860 回答