目录列表的Rails的网站,而不是乘客/ REE升级后 [英] Directory listing instead of Rails site after Passenger/REE upgrade
问题描述
今天已经更新客运和Ruby企业版到最新版本,我现在看到一个目录列表,而不是我的Rails应用程序。这里是我的Apache配置的一部分乘客:
Having updated Passenger and Ruby Enterprise Edition to the latest versions today, I am now seeing a directory listing instead of my Rails app. Here's the Passenger part of my Apache config:
#LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so
#PassengerRoot /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-2.1.3
#PassengerRuby /opt/ruby-enterprise-1.8.6-20090201/bin/ruby
LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
RailsEnv production
RackEnv production
PassengerMaxPoolSize 30
PassengerPoolIdleTime 600
PassengerMaxInstancesPerApp 10
PassengerUseGlobalQueue on
这配置绝对是被加载,虚拟主机绝对是在应用程序的公共目录指向。从Rails的控制台运行时,应用程序本身工作正常。
This config is definitely being loaded, the vhost is definitely pointing at the public directory of the app. The app itself works fine when run from the Rails console.
您会在上面的老客设置都注释掉的配置看。如果我注释掉新的客运班线,并取消了旧的(即切换到旧版本的乘客),应用程序再次正常工作。
You'll see in the config above that the old passenger settings are commented out. If I comment out the new Passenger lines and uncomment out the old ones (i.e. switch to the older version of passenger), the app works fine again.
尝试重新安装客/ REE,没有什么区别。还有在Apache的错误日志或Rails的日志。
Tried reinstalling passenger/REE, no difference. There are no relevant entries in the Apache error log or Rails log.
任何帮助AP preciated!
Any help appreciated!
推荐答案
我可以用这个来解决:
PassengerResolveSymlinksInDocumentRoot
PassengerResolveSymlinksInDocumentRoot
看来,乘客不再处理公共目录是符号链接默认情况下,在其他地方你的应用程序。打开固定所有问题这个选项。
It seems that Passenger no longer handles public directories that are symlinks to your app elsewhere by default. Turning this option on fixed all the issues.
这篇关于目录列表的Rails的网站,而不是乘客/ REE升级后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!