因此,在由 Plesk 管理的虚拟服务器上安装了 CentOS。操作系统最近已自动更新 - 这破坏了自定义 ruby 安装。我还没有设置原始内容,也不熟悉 ruby,因此我有点不知道到底是什么破坏了。
通过包管理器,我确保已安装指定的 ruby 和 gem。我将原始 ruby 文件夹复制回原来的 /var/www/vhost/ 文件夹。在那里,httpdocs 文件夹有一个指向 rails/servername/public 文件夹的软链接。
因此从技术上讲,网站内容应该和以前一样。但是 ruby/mongrel 日志甚至没有更新。
当我访问该网站时,Apache 会抛出 503 - 服务暂时不可用错误。error_log 是唯一更新的内容,这是重启后它包含的内容:
[Sun Apr 21 06:18:30 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Apr 21 06:18:30 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:30 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:30 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:30 2013] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Apr 21 06:18:30 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 21 06:18:30 2013] [notice] Digest: done
[Sun Apr 21 06:18:30 2013] [notice] mod_bw : Memory Allocated 0 bytes (each conf takes 32 bytes)
[Sun Apr 21 06:18:30 2013] [notice] mod_bw : Version 0.8 - Initialized [0 Confs]
[Sun Apr 21 06:18:31 2013] [notice] mod_python: Creating 4 session mutexes based on 50 max processes and 0 max threads.
[Sun Apr 21 06:18:31 2013] [notice] mod_python: using mutex_directory /tmp
[Sun Apr 21 06:18:31 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:31 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:31 2013] [warn] RSA server certificate CommonName (CN) `plesk' does NOT match server name!?
[Sun Apr 21 06:18:31 2013] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Apr 21 06:18:31 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
当我尝试启动 mongrel_rails 时,我看到以下内容:
/usr/lib64/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:109:in `load': uninitialized constant Gem::SourceIndex (NameError)
from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:278
from /usr/bin/mongrel_rails:23:in `load'
from /usr/bin/mongrel_rails:23