需要帮助设置apache的乘客

时间:2011-05-28 17:16:16

标签: ruby-on-rails-3 apache passenger fedora

我正在尝试在Fedora 14上使用apache设置乘客。安装没问题,但是我无法正确配置apache。 我对文件进行了这些更改。除非我注释掉虚拟主机部分,否则我无法启动apache。

  

LoadModule passenger_module   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so   PassengerRoot   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7   PassengerRuby / usr / bin / ruby​​

 <VirtualHost *:80>    
     ServerName localhost    
 DocumentRoot  /home/antarr/pull/public      
     <Directory /home/antarr/pull/public>
            AllowOverride all      
            Options -MultiViews      
      </Directory>  
      </VirtualHost>

2 个答案:

答案 0 :(得分:0)

您还需要在apache2.conf或条件加载的模块特定配置文件中使用以下两行:

PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby

答案 1 :(得分:0)

您无需在您的httpd.conf中修改httpd-vhosts.conf覆盖DocumentRoot

# Override default DocumentRoot with you root
DocumentRoot "/home/antarr/pull/public"
<Directory "/home/antarr/pull/public">
    Allow from all
    Options -MultiViews
    Require all granted
</Directory>

在重新启动服务器之前,请确保已反映出您的配置更改

apachectl -S

文档根目录应指向您的根文件夹。然后重新启动apache。