好吧,我忘了更新我的 Let's Encrypt 服务器证书,所以我无法启动 Apache。以下是 CentOS 给我的当前版本:
service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2019-03-23 18:55:50 PDT; 6s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 3216 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 32430 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Process: 3213 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3213 (code=exited, status=1/FAILURE)
Mar 23 18:55:50 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Mar 23 18:55:50 localhost.localdomain httpd[3213]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name...message
Mar 23 18:55:50 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 23 18:55:50 localhost.localdomain kill[3216]: kill: cannot find process ""
Mar 23 18:55:50 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 23 18:55:50 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Mar 23 18:55:50 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Mar 23 18:55:50 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
所以,我无论如何也不知道到底出了什么问题。我无法启动它……因此我也无法更新我的证书。我是不是被黑客攻击了?我想我不应该在请求帮助时表现得如此简短和愚蠢。以下是我的 Apache 日志的相关和最新内容
/var/log/httpd/error_log
:
[Sat Mar 23 16:27:43.414544 2019] [core:error] [pid 1330] AH00546: no record of generation 19 of exiting child 19951
[Sat Mar 23 16:27:43.533511 2019] [:error] [pid 19955] SSL Library Error: -8181 Certificate has expired
[Sat Mar 23 16:27:43.533542 2019] [:error] [pid 19955] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.
/var/log/httpd/ssl_error_log:
[Sat Mar 23 16:40:20.015874 2019] [ssl:warn] [pid 21695] AH01909: RSA certificate configured for localhost.localdomain:443 does NOT include an ID which matches the server name
[Sat Mar 23 16:40:54.682141 2019] [ssl:warn] [pid 21735] AH01909: RSA certificate configured for localhost.localdomain:443 does NOT include an ID which matches the server name
我只想让我的服务器快速恢复运行,突然间我意识到我在 Logans Run,除了我之外其他人都赢了...............
我知道现在是 2019 年,我有我的选择,但我仍然在使用 Apache,因为我的发行版有它,而且它一直这样工作,你看。
我承认我很懒。有时候我的生活很忙碌,有时候客户要求太多,我累坏了,我忘记去参加聚会、免费研讨会,甚至忘记给狗洗澡。
答案1
我今年已经处理过这个问题了,奇怪的是,这与您的 SSL 服务器证书或被 Hackerd 无关。如果您阅读您提交的日志,您实际上会发现 Apache 给出的有关如何处理的建议。如果您添加此行:
NSSEnforceValidCerts off
到 /etc/httpd/conf.d/nss.conf 您将能够重新启动服务器。别担心,密码团伙还没有上传漏洞来终止您的服务器功能。这里有一个很好的答案来解释到底出了什么问题: https://serverfault.com/posts/578073/revisions
最好卸载 NSS,因为您可能根本不会使用它。只是您的 NSS 证书出问题的时机不对,而且与您的 SSL 证书出问题的时机也不一致。NSS 证书与 SSL 证书无关。