置頂文章

顯示具有 https 標籤的文章。 顯示所有文章
顯示具有 https 標籤的文章。 顯示所有文章

2019年2月25日 星期一

[Web Service] 使用 Apache 設定的 https 接到 Tomcat 上

在apache設定ssl之後,

加上:
ProxyPreserveHost On
ProxyRequests Off
ServerName {domain name}
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

接著重啟apache即可。

Tomcat不用設定憑證,用apache的443接轉到tomcat的8080 port即可。

[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