Monday, June 16, 2008

Steps to make Tomcat run as Https

Steps to make Tomcat https are as below:

- Edit server.xml
Uncomment the below code in the XMl file
<Connector port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />

- open cmd window in C:\Program Files\Java\jdk1.5.0_08\bin
C:\Program Files\Java\jdk1.5.0_08\bin> keytool -genkey -alias tomcat -keyalg RSA (for Windows)
and follow the prompts
password = changeit (for both keystore password and key password for tomcat)

- other useful commands
keytool -help
keytool -delete -alias tomcat

No comments: