1. 程式人生 > >tomcat 配置 https 用keytools

tomcat 配置 https 用keytools

生成jks

keytool -genkey -alias test -keyalg RSA -keysize 1024 -keystore test.jks -validity 365

將jks 移入${tomcat_home}/conf

server.xml配置

<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"  scheme="https" secure="true"  
               maxThreads
="150" keystoreFile="conf/test.jks" clientAuth="false" keystorePass="xxxx" maxHttpHeaderSize="8192" sslProtocol="TLS"/>