无法用Passenger + RailsconfigurationApache

我只是初学者,并尝试了解如何configuration我的RubyOnRails应用程序的apach web服务器。 我有Linux,为乘客安装了apache2,passenger和apache2-module。 安装时,我得到了这样的文字

LoadModule passenger_module /home/rubys/.rvm/.../ext/apache2/mod_passenger.so PassengerRoot /home/rubys/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8 PassengerRuby /home/rubys/.rvm/wrappers/ruby-1.9.2-p290/ruby 

我需要添加到我的Apacheconfiguration文件,所以,我使用

 $ apachectl -V | grep HTTPD_ROOT $ apachectl -V | grep SERVER_CONFIG_FILE 

文件,我需要的是在这里

 /etc/apache2/apache2.conf 

我的导轨应用程序在这里

 /home/alexkd/WebDev/rails/depot 

另外我有像这样的文本在/etc/apache2/ports.conf文件

 NameVirtualHost *:80 Listen80 

我必须复制到我的apache2.conf ? 并在那里我要补充一点:

 <VirtualHost *:80> ServerName depot.yourhost.com DocumentRoot /home/alexkd/WebDev/rails/depot <Directory /home/alexkd/WebDev/rails/depot> AllowOverride all Options -MultiViews </Directory> </VirtualHost> 

您的DocumentRoot必须设置为您的Rails应用程序的public目录。

例如(你似乎正在尝试从Rails书中的演示):

  DocumentRoot /home/alexkd/WebDev/rails/depot/public