Apache 因SSL Library Certificate has expired 无法启动

1、查看服务日志,从/var/log/httpd/nss_error_log 文件中看到如下的错误:

[Sat Aug 20 08:17:49 2016] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.
[Sat Aug 20 08:17:49 2016] [error] SSL Library Error: -8038 SEC_ERROR_NOT_INITIALIZED
[Sat Aug 20 08:17:49 2016] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.
[Sat Aug 20 08:17:49 2016] [error] SSL Library Error: -8038 SEC_ERROR_NOT_INITIALIZED

提示说证书问题。查看下证书:发现时间过期

”certutil -d /etc/httpd/alias -L -n Server-Cert”

2、证书在安装的时候默认时间是4年。

3、处理方法:

     1. 如果不需要用到mod_nss 模块的,那直接把/etc/httpd/conf.d/nss.conf 文件改名或删掉;
     2. 不验证证书过期时间的,在nss.conf 中加入NSSEnforceValidCerts off 配置即可;
     3. 是重新生成新的证书;生成新证书前,务必先删除旧证书数据库文件

              cd /etc/httpd/alias

              rm -f *.db

              /usr/sbin/gencert /etc/httpd/alias > /etc/httpd/alias/install.log 2>&1

              certutil -d /etc/httpd/alias -L -n Server-Cert

              chmod 750 *.db(因为是在root下面操作的,生成的是权限是root权限)

重启httpd

 

转载于:https://www.cnblogs.com/Fle-x/articles/5789614.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值