免費ssl憑證申請:
https://www.sslforfree.com/
按照網站說明成功取得憑證:
ca_bundle.crt ,
certificate.crt ,
private.key ,
上述三個檔案,
接著製作Tomcat用的憑證:
輸入指令:
openssl pkcs12 -export -in certificate.crt -inkey private.key -out cqihttp.p12 -certfile ca_bundle.crt
接著設定密碼,
完成後再輸入指令:
keytool -importkeystore -alias 1 -destkeystore tomcat.keystore -srckeystore cqihttp.p12 -srcstoretype pkcs12
接著設定密碼,產生憑證完畢「tomcat.keystore」。
然後在tomcat server.xml 增加下述設定:
<Connector
protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" maxThreads="150"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="conf/tomcat.keystore" keystorePass="{密碼}"
sslProtocol="TLS" SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"/>
再重新啟動Tomcat即可。
但是在Linux上不允許使用者安裝的服務在小於1024 port運行,所以需要apache轉到tomcat上。
置頂文章
2019年2月25日 星期一
[Web Service] Apache 的 https 憑證設定
免費ssl憑證申請:
https://www.sslforfree.com/
按照網站說明成功取得憑證:
ca_bundle.crt ,
certificate.crt ,
private.key ,
上述三個檔案,
在ubuntu的apache ssl conf檔案加上:
SSLCertificateFile certificate.crt的路徑
SSLCertificateKeyFile private.key的路徑
SSLCertificateChainFile ca_bundle.crt的路徑
重新啟動apache即可。
參考網址:
https://n.sfs.tw/content/index/10939
https://www.sslforfree.com/
按照網站說明成功取得憑證:
ca_bundle.crt ,
certificate.crt ,
private.key ,
上述三個檔案,
在ubuntu的apache ssl conf檔案加上:
SSLCertificateFile certificate.crt的路徑
SSLCertificateKeyFile private.key的路徑
SSLCertificateChainFile ca_bundle.crt的路徑
重新啟動apache即可。
參考網址:
https://n.sfs.tw/content/index/10939
訂閱:
文章 (Atom)