我知道rails是ruby框架,apache是rails.While的服务器,Phusion Passenger是用来做什么的?它是服务器还是部署工具?
现在我正试图在服务器上部署我的rails应用程序,而我不知道如何使用Phusion Passenger和apache来运行我的应用程序):
提前感谢
发布于 2013-01-29 23:09:52
Phusion Passenger只是一个apache mod,需要在您的应用程序正在使用的虚拟主机中激活,它告诉apache使用的是哪个版本的Rails以及其他类似的配置。因此,基本上,Apache使用Passenger来运行Ruby on Rails应用程序。
要安装Passenger:https://www.phusionpassenger.com/download,您必须阅读以下内容(只需向下滚动一点即可阅读开放源码版本的文档)。
这是为了设置它,并为你的一个应用程序运行它:,http://www.modrails.com/documentation/Users%20guide%20Apache.html#_configuring_phusion_passenger,所以,是的,这里有很多文本,但你不需要阅读所有内容。
此外,当你安装它时,Passenger会确切地告诉你在你的虚拟主机配置中写什么,基本上,只有2行文本。:)
大多数情况下,如果您有一个如下所示的虚拟主机:
<VirtualHost *:80>
ServerName www.wsgiapp.com
DocumentRoot /webapps/wsgiapp/public
<Directory /webapps/wsgiapp/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>Passenger会告诉你在安装后要写这样的代码:
<VirtualHost *:80>
ServerName www.wsgiapp.com
DocumentRoot /webapps/wsgiapp/public
PassengerRuby /usr/bin/ruby
PassengerRoot /somewhere/passenger/x.x.x
<Directory /webapps/wsgiapp/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>https://stackoverflow.com/questions/14585755
复制相似问题