一、生成證書apache
keytool -genkey -alias cas -keyalg RSA -keysize 2048 -keypass 123456 -storepass 123456 -keystore D:/oxccl.keystore -dname "CN=cas.oxccl.org,OU=oxccl.com,O=oxccl,L=Beijing,ST=Bejing,C=CN"
二、修改tomcat server.xmltomcat
<!-- <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> --> <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"> <SSLHostConfig> <Certificate certificateKeystoreFile="D:/oxccl.keystore" type="RSA" certificateKeystoreType="JKS" certificateKeystorePassword="123456"/> </SSLHostConfig> </Connector>
三、修改hosts文件code
127.0.1.1 cas.oxccl.com