1、在jdk1.8.0_181目录下执行
keytool -genkey -alias tomcat -keyalg RSA -keysize 2048 -validity 36500 -keystore D:\tomcat.keystore
D:\tomcat.keystore:指定生成的路径
2、在cas运行的tomcat目录里面配置server.xml
2.1、注释AJP/1.3 <!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> -->
2.2、把 <!-- <Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" /> -->
替换成
<Connector port="8090" protocol="org.apache.coyote.http11.Http11Protocol" connectionTimeout="20000" SSLEnabled="true" maxThreads="150"
scheme="https" secure="true" clientAuth="false" sslProtocol="TLS"
keystoreFile="D:\\tomcat.keystore" keystorePass="123456" />
keystoreFile:生成的https钥匙目录
keystorePass:设置的密码