ubuntu tomcat https

1.generate key use java key tool

sudo keytool -genkey -alias ### -keyalg RSA -keystore ##.jks -validity 3600 -storepass ***

2.sign certificate 

sudo keytool -export -alias ### -file ##.cer -keystore ##.jks -storepass ***

3.modify server.xml

<Connectorport="8443" protocol="HTTP/1.1"SSLEnabled="true"

               maxThreads="150" scheme="https" secure="true"

               clientAuth="false" sslProtocol="TLS"

               keystoreFile="/etc/tomcat7/##.jks"

              keystorePass="***"  />

 

test it:

https://ip:8443

posted on 2017-02-09 18:03  斜月三星一太阳  阅读(251)  评论(0编辑  收藏  举报