代码之家  ›  专栏  ›  技术社区  ›  Tim Fountain

在Passenger/REE升级后目录列表代替Rails站点

  •  1
  • Tim Fountain  · 技术社区  · 16 年前

    #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
    

    这个配置肯定正在加载,vhost肯定指向应用程序的公共目录。当从Rails控制台运行时,应用程序本身工作正常。

    您将在上面的配置中看到,旧的乘客设置被注释掉了。如果我注释掉新的客运线路,取消注释掉旧的客运线路(即切换到旧版本的客运线路),应用程序会再次正常工作。

    尝试重新安装乘客/REE,没有区别。Apache错误日志或Rails日志中没有相关条目。

    感谢您的帮助!

    2 回复  |  直到 16 年前
        1
  •  1
  •   Tim Fountain    16 年前

    我可以用以下方法解决这个问题:

    PassengerResolveSymlinksInDocumentRoot用户

    似乎Passenger不再处理默认情况下指向其他应用程序的符号链接的公共目录。启用此选项可以解决所有问题。

        2
  •  1
  •   Ram on Rails    15 年前

    我意识到有/etc/hosts将我的应用程序的公共URL指向127.0.0.1,以便在twitter中进行测试回调。

    它只会继续显示一个空白的文件列表。

    推荐文章