欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

linux tomcat配置https的方法

 更新時(shí)間:2017年08月11日 11:55:34   作者:互聯(lián)網(wǎng)編程  
這篇文章主要介紹了linux tomcat配置https的方法,需要的朋友可以參考下

創(chuàng)建.keystore

[root@centos apache-tomcat-6.0.37]# keytool -genkey -alias tomcat -keyalg RSA -keystore /root/tomcat/apache-tomcat-6.0.37/conf/.keystore
輸入keystore密碼: 
再次輸入新密碼:
您的名字與姓氏是什么?
 [Unknown]: free4lab
您的組織單位名稱是什么?
 [Unknown]: free4lab
您的組織名稱是什么?
 [Unknown]: free4lab
您所在的城市或區(qū)域名稱是什么?
 [Unknown]: beijing
您所在的州或省份名稱是什么?
 [Unknown]: beijing
該單位的兩字母國家代碼是什么
 [Unknown]: CN
CN=free4lab, OU=free4lab, O=free4lab, L=beijing, ST=beijing, C=CN 正確嗎?
 [否]: y
輸入<tomcat>的主密碼
  (如果和 keystore 密碼相同,按回車): 
[root@centos apache-tomcat-6.0.37]# cat conf/.keystore

然后修改tomcat配置文件server.xml

<Connector port="8443" SSLEnabled="true"
        maxThreads="150" scheme="https" secure="true" protocol="org.apache.coyote.http11.Http11Protocol"
        clientAuth="false" keystoreFile="P:\servers\apache-tomcat-8.0.36_2\conf\.keystore" keystorePass="wewell" sslProtocol="TLS" />

這樣瀏覽器訪問就相對(duì)安全了,瀏覽器和服務(wù)端進(jìn)行了非對(duì)稱加密的握手,然后協(xié)商對(duì)稱加密的密鑰,然后進(jìn)行相對(duì)快速的對(duì)稱加密傳輸。

即時(shí)密文在網(wǎng)絡(luò)傳輸中被截獲,因?yàn)闊o法獲知對(duì)稱密鑰,所以這個(gè)http api就是安全的!

總結(jié)

以上所述是小編給大家介紹的linux tomcat配置https的方法,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論