系統環境:html
系統:阿里雲ECS CentOS6.5+Apache2.4.10linux
前提:公司須要將站點升級到使用SSL證書服務(https)apache
實踐執行:在阿里雲的證書服務--選擇了一個免費的證書服務,畢竟第一次配置,有免費的就先用免費的配置吧。節約成本哈[/鬼臉]
證書管理購買頁面地址:https://yundun.console.aliyun.com/?spm=5176.2020520110.1002.d10cas.6c1b1426nLEXAP&p=cas#/cas/home
頁面有很詳細的操做流程指引(這一點阿里雲作的很是的好,不得不佩服他們的良苦用心,點32個贊!)阿里雲
都是系統審覈的速度很快,幾分鐘就能搞定。spa
注意一點:若是系統沒有將TXT記錄值添加到域名解析(要求域名在同一個阿里雲帳號下,而且是使用的阿里雲DNS解析服務,若是不是,請手工去添加TXT記錄值),須要手工去添加。我在這裏遇到的坑,等的時間比較長,因此特地記錄提醒下。.net
https://yundun.console.aliyun.com/?spm=5176.2020520110.1002.d10cas.6c1b1426nLEXAP&p=cas#/cas/download/214196189930135unix
遇到的幾個問題:rest
1、動態的添加mod_ssl.so遇到的問題htm
https://yq.aliyun.com/ziliao/70110 linux下不從新編譯apache添加安裝mod_ssl模塊和錯誤的處理方法
不過並無想象中的那麼順利,在操做中還遇到了其它問題,在這以前須要先安裝openssl組件,不然上面的執行不能經過編譯,使用源碼安裝openssl,參考連接:http://www.cnblogs.com/nikolatesfei/p/5775229.htmlblog
錯誤信息:
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536
解決方法:經過查找資料瞭解到缺乏openssl 開發軟件包編譯的組件openssl-devel
[root@iZbp14bb5du5arzqt6mgzxZ ssl]# yum install openssl-devel
以後在去動態的編譯mod_ssl.so就順利經過了。
2、證書鏈配置問題
SSLCertificateChainFile 指令被棄用
[root@***]# service httpd restart
AH02559: The SSLCertificateChainFile directive (/httpd/conf/extra/httpd-ssl.conf:21) is deprecated, SSLCertificateFile should be used instead
官方:http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile 說明Apache是從2.4.8開始棄用這個指令的。
參考資料連接:
openssl-devel和openssl 是什麼具體關係 ?
openssl-devel和openssl 是什麼具體關係_百度知道 https://zhidao.baidu.com/question/919579491101051499.html