【发布时间】:2014-08-29 06:49:51
【问题描述】:
我使用 Apache 作为反向代理,在它后面我使用Phusion Passenger(a Rails Server) 作为应用服务器 。我对 Apache 如何与 Phusion Passenger(其背后是 Application Server)通信感到困惑。
这是我从httpd 得到的:
> ps aux | grep /MyWebsite/bin/httpd
googly 8353 0.0 0.0 73856 3280 ? Ss Aug26 0:00 /MyWebsite/bin/httpd -d /MyWebsite -f var/state/apache-1080/httpd.conf
googly 8391 0.0 0.0 73856 1828 ? S Aug26 0:00 /MyWebsite/bin/httpd -d /MyWebsite -f var/state/apache-1080/httpd.conf
... # showing that 8353 forks 10 process, and 8353 is the father process
当一个 HTTP 请求到来时,Apache 分配一个进程来处理这个请求(例如进程 8391),将它传递给应用服务器。
我的问题是,这到底是怎么回事? Apache 如何与应用服务器通信?我认为不同的应用服务器在这种情况下是相似的。
8391 是否将请求传递给 Phusion Passenger?如果是这样,Phusion Passenger 应该有自己独立的进程运行,对吧?或者8391可以看作是PhusionPassenger进程,它可以自己处理请求?
【问题讨论】:
标签: apache http webserver passenger reverse-proxy