2013-09-26 38 views
0

我有一个Rails应用程序,它在Windows机器上的"thin"服务器上运行。我听说最好的Server for Rails是Phusion Passenger,但不幸的是我的服务器运行在Windows机器上,并且不能在Windows中安装Phusion Passenger。Rails 3:在Windows机器上的Apache Server中部署Rails 3应用程序?

是否可以在Apache服务器中部署我的Rails应用程序。如果可能的话,它会影响我的Rails应用程序的性能。

任何帮助表示赞赏。

回答

1

您可以使用apache将对代理服务器的请求反向。 Apache的配置指令看起来有点像这样(你可能需要更改这些)

DocumentRoot /path/to/rails/public 

<Location /assets > 
    ProxyPass ! 
</Location> 

ProxyRequests Off 

ProxyPass/http://localhost:3000/ 
ProxyPassReverse/http://localhost:3000/ 

替换3000设置薄上运行的端口。