需要帮助设置apache的乘客

问题描述 投票:0回答:2

我正试图在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 /斌/红宝石

 <VirtualHost *:80>    
     ServerName localhost    
 DocumentRoot  /home/antarr/pull/public      
     <Directory /home/antarr/pull/public>
            AllowOverride all      
            Options -MultiViews      
      </Directory>  
      </VirtualHost>
ruby-on-rails-3 apache passenger fedora
2个回答
0
投票

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

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

0
投票

而不是修改httpd-vhosts.conf覆盖你的httpd.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

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

© www.soinside.com 2019 - 2024. All rights reserved.