tomcat version: apache-tomcat-6.0.2 (without apache and under windows)
op: windows xp
two main step:
- 1. create a certificate file
- 2. change some config in conf/server.xml
1. create a certificate file
keytool -genkey -alias tomcat -keyalg RSA -keystore "/keystore"
add -validity *** parameter can prolong the expired time. the default value is 30 days.
keytool is a command in <JAVA_HOME>/bin directory, and the others left is parameters. "/keystore"
is path and file name of the cerificate file. After that, I copy it to <TOMCAT_HOME>/conf directory.
2. modify server.xml
find relavant parts as fellowing and chang to it.
<Connector port="8443" protocol="HTTP/1.1"
maxThreads="150" scheme="https" secure="true"
SSLEnabled="true" keystoreFile="conf/keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
now, run tomcat. I can access my server like url - https://127.0.0.1:8443