使用场景:
java后台.提供接口给IOS和安卓APP客户端
实现方式:
1.在阿里云申请一个免费的证书,阿里云上有详细的步骤指引
地址:
https://common-buy.aliyun.com/?spm=5176.8064714.317898.pricedetail1111.TSNIe3&commodityCode=cas#/buy
2.下载之后将证书放在服务器上
3.配置tomcat
<Connector port="443" protocol="HTTP/1.1"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
sslEnabledProtocols="TLSv1"
keystoreFile="c:/xxx/key/xxxxxx.pfx"
keystoreType="PKCS12"
keystorePass="xxxxxxx"/>
4.访问时使用https出现绿色小锁,成功