收到系統通知信『The certificate for 個人網址 will expire in xx days』?

今年又遇到問題了~XD
想到去年有發文到鳥哥那邊去詢問
http://phorum.vbird.idv.tw/viewtopic.php?f=2&t=37191
這次再來一次留檔給自己看好了

********************************

最近發現系統發了幾封信給我的linux主機root信箱
標題是『The certificate for jir.no-ip.org will expire in xx days』
xx是數字

內容大概是寫:

################# SSL Certificate Warning ################

Certificate for hostname 'jir.no-ip.org', in file (or by nickname):
/etc/pki/tls/certs/localhost.crt

The certificate needs to be renewed; this can be done
using the 'genkey' program.

Browsers will not be able to correctly connect to this
web site using SSL until the certificate is renewed.

##########################################################
Generated by certwatch(1)

參考這邊的高手回答:
http://yourlinuxguy.com/?p=547

把認證檔案的資料夾做備份

cp -av /etc/pki/tls /etc/pki/tls.bak

用genkey建立一個新的認證檔
而且天數給他設定個一年(預設是30天)
genkey --days 360 xxx.xxx.xxx

(xxx.xxx.xxx指的是網址 localhost應該也沒關係)

過程中應該是會問一些設定
像是國家簡寫 我打TW
州名位置我打 Taiwan全名
城市、公司名、部門名打好以後
按著訊息提示就會建立檔案出來

接著確認生成的認證檔案是否能讓apache的ssl.conf能讀取正常
cd /etc/httpd
egrep -R -e "SSLCertificateKeyFile" -e "SSLCertificateFile" *

沒錯誤的話
就是重新啟動apache服務亦可
/etc/init.d/httpd restart

完成!~

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

請輸入下列驗證碼計算後阿拉伯數字 (Translate it, if not Taiwanese to post reply) *