||  網站導覽  ||  留言版
 
  站長 x 管理人
 
  文章分類
    JAVA
    Database資料庫
    應用程式
    文書處理
    normal一般設定
    Web-design網頁設計
    Virtual Machine虛擬機器
    MIS網管
       Mac
       不分類
       Windows
       Linux
    media多媒體
    未分類
 
 
 
 
「實作」Centos-Certificate has expired導致網站掛掉
 
 
 
 
今天一進公司,客戶就打來說他家的網站掛了

一看是apache掛了,起不來

打開log,出現一堆
[Sun Jul 27 10:02:08 2015] [error] SSL Library Error: -8181 Certificate has expired
[Sun Jul 27 10:02:08 2015] [error] Unable to verify certificate 'Server-Cert'. Add "NSSEnforceValidCerts off" to nss.conf so the server can start until the problem can be resolved.

爬文之後,是mod_nss這個套件使用的憑證到期
使用
# certutil -d /etc/httpd/alias -L -n Server-Cert
看了一下,憑證的有效期
Validity:
            Not Before: Mon Jul 25 06:05:28 2011
            Not After : Sat Jul 25 06:05:28 2015


暫時性解決方式在nss.conf加上
NSSEnforceValidCerts off
重啟apache

沒用到的話,就一勞永逸,移了他
# yum remove mod_nss
相依性套件為:mod_revocator

如果會用到的話,一樣是先移除
# yum remove mod_nss
刪除相關檔案
# rm -Rf /etc/httpd/alias/*
重新安裝mod_nss
# yum install mod_nss
這樣的話,就會產生新的憑證
有效期是安裝日+4年
(記得四年後要再做一次這個動作,XD)


至於為啥會裝mod_nss的套件,
就經銷商在主機出貨前灌os,把所有套件都安裝上去了,
實在很不喜歡這樣子


參考資料:
SSL Library Error: -8181 Certificate has expired


 

 
 
 
 
Copyright © 2012 NBOX. All Rights Reserved.