阿帕奇到PSGI代理通过Unix域套接字 [英] Apache-to-PSGI proxy over a Unix domain socket

查看:229
本文介绍了阿帕奇到PSGI代理通过Unix域套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有相同的机器上运行,因此需要其PSGI服务器到唯一的端口运行PSGI应用的许多(隔离)的安装。这是不到一个资源/管理的角度看理想,但在同一台机器上运行时,它也需要(尚未不可测量的,可能微不足道)TCP / IP的开销当一个Unix域套接字似乎是更明智的选择

We have many (isolated) installations of a PSGI app that run on the same machine and thus require their PSGI servers to run on unique ports. This is less than ideal from a resource/management perspective, but it also requires the (yet-unmeasured and possibly insignificant) "overhead" of TCP/IP when a Unix domain socket would seem to be more obvious choice when running on the same machine.

幸运的是,应用程序下普拉克的HTTP接口(通过mod_proxy的的的ProxyPass来自Apache代理)的作品,但不幸的是,它的FastCGI接口下打破(见:的可PSGI应用程式下普拉克::处理器:: FCGI fork()的?)。

Fortunately, the app works under Plack's HTTP interface (proxied from Apache via mod_proxy's "ProxyPass"), but unfortunately, it breaks under the FastCGI interface (see: Can PSGI apps fork() under Plack::Handler::FCGI?).

除此之外的mod_fastcgi的FastCgiExternalServer(或修补的mod_proxy这个未经测试,用户贡献的补丁程序:<一href=\"http://mail-archives.apache.org/mod_mbox/httpd-dev/201207.mbox/%3C20120731200351.GB11038@gmail.com%3E\" rel=\"nofollow\">http://mail-archives.apache.org/mod_mbox/httpd-dev/201207.mbox/%3C20120731200351.GB11038@gmail.com%3E),有没有什么办法来代理阿帕奇连接的通过Unix域套接字的一个PSGI应用程序?

Other than mod_fastcgi's FastCgiExternalServer (or patching mod_proxy with this untested, user-contributed patch: http://mail-archives.apache.org/mod_mbox/httpd-dev/201207.mbox/%3C20120731200351.GB11038@gmail.com%3E), is there any way to proxy Apache connections over a Unix domain socket to a PSGI app?

推荐答案

mod_proxy_fdpass 允许Apache以代理域套接字,虽然我还没有尝试过。

There is mod_proxy_fdpass which allows Apache to proxy to domain sockets, although I haven't tried it.

我个人推荐使用的标准各-APP-上一个端口的安排,除非你可以测量的开销是值得做标新立异的。

I was personally recommend using the standard each-app-on-a-port arrangement, unless you can measure the overhead to be worth doing something unconventional for.

您还可以使用每个应用程序一个私有到该服务器的IP地址,并让他们在自己的私人IP地址端口80上运行的所有的选项。

You also have the option of using one private-to-the-server IP address per app, and having them all run on port 80 on their private IPs.

这篇关于阿帕奇到PSGI代理通过Unix域套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆