我正试图在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>
您还需要在apache2.conf或条件加载的模块特定conf文件中包含以下两行:
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.7
PassengerRuby /usr/local/bin/ruby
而不是修改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。