Alfred’s Computing Weblog

Alfred Java-cored Computing Weblog

Posts Tagged ‘ssl

SSL ya Tomcat

leave a comment »

Steps to enable SSL for your tomcat

1. Generate SSL key for your computer.

$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/my/keystore

Reminder: check ../tomcat/conf/tomcat-user.xml for tomcat user’s password

2. Edit server.xml
– Open ../tomcat/conf/server.xml
– Uncomment following lines and add in “keystoreFile” and “keystorePass”

 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               keystoreFile="/path/to/my/keystore" keystorePass="password"
               clientAuth="false" sslProtocol="TLS" />

3. You are DONE. You can try to access HTTPS with Port 8443 now.

Reference: Tomcat 6.0 SSL Configuration, here.

My environment:
Apache Tomcat v6.0.32
Sun Java v1.6.0_21
Red Hat 4.1.2-50


Written by Alfred

July 25, 2011 at 14:20

Posted in tomcat

Tagged with ,