【问题标题】:Passenger/Apache Rails on CentOS only works in Development but not ProductionCentOS 上的 Passenger/Apache Rails 仅适用于开发,但不适用于生产
【发布时间】:2015-06-19 08:34:52
【问题描述】:

我已经安装了Passenger、Apache和Passenger Apache模块错误。知道为什么吗?

编辑:apache 日志和 Rails 日志中均未显示任何内容

这里是我的httpd.conf 中与域相关的部分:

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.3/gems/passenger-5.0.6/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
        PassengerRoot /usr/local/rvm/gems/ruby-2.1.3/gems/passenger-5.0.6
        PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.1.3/wrappers/ruby
</IfModule>

RackEnv production
<VirtualHost *:80>
        ServerName www.mydomain.com
        ServerAlias www.mydomain.com
        ServerAlias mydomain.com
        # !!! Be sure to point DocumentRoot to 'public'!
        DocumentRoot /var/www/html/ruby/myapp/public
      <Directory /var/www/html/ruby/myapp/public>
                # This relaxes Apache security settings.
                AllowOverride all
                # MultiViews must be turned off.
                Options -MultiViews
                # Uncomment this if you're on Apache >= 2.4:
                #Require all granted
        </Directory>
</VirtualHost>

谁能告诉我缺少什么?

【问题讨论】:

  • 你得到什么错误?您是否在 apache.log 中看到任何表明问题的内容?
  • 很遗憾没有。那就是问题所在。 apache 日志和 Rails 应用程序日志中没有任何内容。
  • 在尝试运行 rails 控制台(在任一模式下)时是否遇到任何错误?这听起来可能是权限问题。

标签: ruby-on-rails apache passenger centos6


【解决方案1】:

默认passenger,如果不能保存error到log,把full error保存到tmp目录。 文件掩码-passenger-error-*.html 例如,请检查您的 /tmp,在我的系统日志中保存到该位置:

/tmp/passenger-error-J5xYtO.html

【讨论】:

  • 有一个/tmp/passenger.Iydkbm5 文件夹,但是没有错误文件。我什至搜索过sudo find . -name '*error*',但没有得到任何结果。
猜你喜欢
  • 1970-01-01
  • 2013-11-13
  • 1970-01-01
  • 1970-01-01
  • 2017-08-22
  • 2013-11-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多