1. 程式人生 > >單點登陸2之tomcat支援https訪問

單點登陸2之tomcat支援https訪問

(1)生成keystore檔案

keytool   -genkey   -keystore  "D:\keystore\localhost.keystore"   -alias   testcj   -keyalg   RSA   -validity  365      -dname  "CN=localhost, OU=org, O=org.cj, L=昆明, ST=雲南, C=中國"   -keypass  testcj  -storepass   testcj

keytool命令如下

(2)修改server.xml檔案-新增如下配置

<Connector SSLEnabled="true" clientAuth="false" keystoreFile="D:\keystore\localhost.keystore" keystorePass="testcj" maxThreads="150" port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslProtocol="TLS"/>

啟動tomcat