2011 m. spalio 25 d.

Apache Tomcat 7.x using SSL

Download and install Apache Tomcat 7.0 as Windows Service.

Generate keystore file:

keytool.exe -genkey -alias tomcat -keyalg RSA -keystore .keystore

Optionally you can export certificate:
keytool.exe -export -alias tomcat -file tomcat.crt -keystore .keystore

Add the following parameters to Connector element (where port is 8443):

  • keystoreFile="C:/tomcat70/.keystore"
  • keystorePass="changeit"

Change protocol to: protocol="org.apache.coyote.http11.Http11Protocol"

 

Finished connector element looks like:

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" scheme="https"
               secure="true"
               SSLEnabled="true"
               sslProtocol="TLS"
               keystoreFile="C:/tomcat70/.keystore"
               keystorePass="changeit"
               clientAuth="false"  URIEncoding="UTF-8"/>