简单来说就是安全的http。即http下加入ssl层 (Secure Socket Layer)。html
整个ssl基本过程(单向认证):算法
单向认证:只需对服务端的认证(不须要对客户端进行认证),即只要在服务端配置证书。apache
使用JDK中bin下自带keytool.exe工具。tomcat
keytool -genkeypair -alias "tomcat" -keyalg "RSA" -keystore "e:\tomcat.keystore"
-genkeypair:生成密钥对。安全
-alias:指定别名。工具
-keyalg:指定算法。加密
-keystore:存储地址。spa
其后需输入密码(后面server.xml配置中须要)以及其余信息(如组织、地区、城市等)code
在tomcat/conf/server.xml放开以下配置server
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="e:\tomcat.keystore" keystorePass="123456" />
http://jingyan.baidu.com/article/a948d6515d3e850a2dcd2ee6.html