我对 Linux 还很陌生,所以我真的不知道如何解决这个问题。
我有一个在 CentOS 上运行的 vServer,由 Plesk 10 管理。我的网站现在随机关闭了几个小时。
apache 日志中的错误说明如下:
[Sun Aug 19 21:31:00 2012] [notice] caught SIGTERM, shutting down
[Sun Aug 19 21:32:21 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Aug 19 21:32:22 2012] [notice] Digest: generating secret for digest authentication ...
[Sun Aug 19 21:32:22 2012] [notice] Digest: done
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Sun Aug 19 21:32:22 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Aug 19 21:32:22 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
答案1
第一行显示,有东西正在向它发送信号。该信号始终来自外部。也许设置了 cronjob 来定期重启它?也许 plesk 有问题?从该日志中无法判断发生了什么,只能说有东西发出了关闭它的命令。
有可能,如果它在停止后正在执行初始化操作,看门狗会认为它已挂起并重新启动它。如果是这种情况,并且您注意到它已经停机一段时间,请检查您的熵池中是否有足够的熵,或将随机设备更改为 /dev/urandom(如果这样做,可能会存在安全漏洞)。启动后,apache 通常会阻止并等待随机数据(用于 SSL),然后再处理任何请求(无论是否使用 SSL)。