一天早上主管通知我說一台 Linux 主機連不上去,經檢查發現是 Apache 沒有啟動,嘗試手動啟動卻失敗。
檢查 /var/log/httpd/error.log 發現有下列幾個訊息。
[Wed Dec 17 08:22:03 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:28:34 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:43:42 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:44:35 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:46:46 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:47:48 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:47:51 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:47:52 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:47:53 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:47:54 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:49:48 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:50:27 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 08:57:17 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 09:00:57 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 17 09:07:55 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
據了解,似乎是 mod_nss 憑證過期,在 /var/log/httpd 可以看到下列訊息。
[Wed Dec 17 09:00:57 2014] [error] Certificate not verified: 'Server-Cert'
[Wed Dec 17 09:00:57 2014] [error] SSL Library Error: -8181 Certificate has expired
[Wed Dec 17 09:00:57 2014] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.
可以修改 /etc/httpd/conf.d/nss.conf 裡的 NSSEngine 這個參數為 off 來關閉這個訊息。
重新啟動 service httpd start 就正常了。
沒有留言:
張貼留言