Sunday, November 10, 2013

How to configure Tomcat to support SSL or https

first you need to create a keystore with following command.

 keytool -genkey -keyalg RSA -keystore /home/chathuranga/test_chathu.keystore

then answers for the questions that prompts sequentially. once the keystore is created, you can use the following command to check whether your keystore is there.

keytool -list -keystore /home/chathuranga/test_chathu.keystore

Now it is the time to do the tocat SSL configuration.

In tomcatHome/conf/server.xml file, change the SSL configuration as follows.

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

Then restart the tomcat server and try to access the following URL.


you will notice that, your tomcat installation supports SSL(HTTPS) now.

Chathuranga Tennakoon

No comments:

Post a Comment