我的服务器是:
Server version: Apache/2.2.11 (Ubuntu)
Server built: Aug 16 2010 17:44:11我的红宝石版ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]。
我已经通过passenger 3.0.7安装了RubyGems。我运行过passenger-install-apache2-module,一切都很顺利。我修改了配置(加载模块、编辑虚拟主机等)重新启动阿帕奇。模块正在加载(apache没有抱怨)。但乘客显然不能工作:
sudo passenger-status
ERROR: Phusion Passenger doesn't seem to be running.我怎么才能让它起作用?
LoadModule passenger_module /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.7/ext/apache2/mod_passenger.so乘客的根:
passenger-config --root
/usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.7Apache VirtualHost子URI配置在/etc/apache2/sites启用/railsapps中:
<VirtualHost <IP ADDRESS>:80>
ServerAdmin webmaster@localhost
ServerName my.server.name
PassengerRoot /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.7
PassengerRuby /usr/bin/ruby
RailsEnv development
DocumentRoot /www/vhosts/railsapps
<Directory /www/vhosts/railsapps>
Options FollowSymlinks -MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
RailsBaseURI /siteA
<Directory /www/vhosts/railsapps/siteA>
Options -MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RailsBaseURI /siteB
<Directory /www/vhosts/railsapps/siteB>
AllowOverride All
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
LogLevel info
ErrorLog /var/log/apache2/railsapps_error.log
CustomLog /var/log/apache2/railsapps_access.log combined
</VirtualHost>当然,与‘用户指南’一样,apache.html、siteA和siteB分别是指向siteA/public和siteB/public绝对路径的符号链接。
在原木中没有与乘客有关的东西。权限在路径中的目录上也很好(读和可执行)。即使这是一些错误的配置或许可问题,乘客不应该运行吗?我的意思是sudo passenger-status至少应该输出--- general information ---。当我将一些测试html文件放置在railsapps目录中时,就会得到很好的服务。
[Sun Jun 19 12:19:08 2011] [error] [client <IP>] Directory index forbidden by Options directive: /www/vhosts/railsapps/siteA/
[Sun Jun 19 12:19:08 2011] [error] [client <IP>] File does not exist: /www/vhosts/railsapps/favicon.ico发布于 2012-11-21 18:04:57
由于日志条目的可执行路径不存在,因此无法启动监视狗。在众多站点中,PassengerRoot设置为旧路径和旧版本的乘客。这导致了一个问题。
https://serverfault.com/questions/281892
复制相似问题