首页 > 其他分享 >记一次由于所换证明书不当,导致apahce启动不起来

记一次由于所换证明书不当,导致apahce启动不起来

时间:2023-12-25 15:37:56浏览次数:25  
标签:所换 httpd 证明书 14 service 25 apahce key Dec

背景提要
由于要做APP审查,网站证明书过期,请同事更新下证明书, 更新完证明书,apache 不能重启了

重启所报错误

[root@xxx ~]# systemctl start httpd.service

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@xxx  ~]# systemctl restart httpd

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

用 systemctl status httpd 命令查看,结果如下:

[root@xxx conf.d]# systemctl status httpd

● httpd.service - The Apache HTTP Server

  Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

  Active: failed (Result: exit-code) since Mon 2023-12-25 14:23:49 CST; 7min ago

    Docs: man:httpd(8)

          man:apachectl(8)

  Process: 21919 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)

  Process: 19390 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)

  Process: 21918 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

Main PID: 21918 (code=exited, status=1/FAILURE)

Dec 25 14:23:49 demo systemd[1]: Starting The Apache HTTP Server...

Dec 25 14:23:49 demo systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE

Dec 25 14:23:49 demo kill[21919]: kill: cannot find process ""

Dec 25 14:23:49 demo systemd[1]: httpd.service: control process exited, code=exited status=1

Dec 25 14:23:49 demo systemd[1]: Failed to start The Apache HTTP Server.

Dec 25 14:23:49 demo systemd[1]: Unit httpd.service entered failed state.

Dec 25 14:23:49 demo systemd[1]: httpd.service failed.

通过 搜索 【apache 再启动 kill[21919]: kill: cannot find process 】关键字,找到下面这篇文章:``

最终通过查看 apache error_log 和 ssl 的 error_log 找到原因:

tail -n 20 /var/log/httpd/error_log:
[Mon Dec 25 14:14:55.472119 2023] [ssl:emerg] [pid 1767] AH02238: Unable to configure RSA server private key

[Mon Dec 25 14:14:55.472140 2023] [ssl:emerg] [pid 1767] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

[Mon Dec 25 14:17:48.877004 2023] [ssl:emerg] [pid 20223] AH02238: Unable to configure RSA server private key

[Mon Dec 25 14:17:48.877025 2023] [ssl:emerg] [pid 20223] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
tail -n 100 /var/log/httpd/pia_ssl_error_log:
[Mon Dec 25 14:14:55.472119 2023] [ssl:emerg] [pid 1767] AH02238: Unable to configure RSA server private key

[Mon Dec 25 14:14:55.472140 2023] [ssl:emerg] [pid 1767] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

[Mon Dec 25 14:17:48.877004 2023] [ssl:emerg] [pid 20223] AH02238: Unable to configure RSA server private key

[Mon Dec 25 14:17:48.877025 2023] [ssl:emerg] [pid 20223] SSL Library Error: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

同事把证明书恢复成之前的之后,apache 就可以启动起来了

标签:所换,httpd,证明书,14,service,25,apahce,key,Dec
From: https://www.cnblogs.com/xixi-and-haha/p/17926164.html

相关文章

  • 证明书怎么写格式
    证明书怎么写格式篇1兹证明xxx,学号:xxxx,女/男,出生年月:xxxx年xx月xx日。现就读于电子科技大学成都学院经济与管理工程系xxxx专业,学制x年,现为x科x年级学生。我校是......
  • 证明书格式
    证明书格式篇1兹证明________是我公司员工,在________部门任________职务。至今为止,一年以来总收入约为__________元。特此证明。本证明仅用于证明我公......