Skip to main content


Showing posts from February, 2013

4-step configuration of SSL encryption on Tomcat in Ubuntu Linux using Self-Signed Certificate

First things first, the title makes it clear that the user is expected to know about terms SSL, Tomcat and Linux, so getting straight to the topic. The simple steps below can save hours of your time if you followed them sequentially.

So, you have a web application ready to deploy and you want your communication to be entrypted and make sure that you are talking to the right server. Configuring SSL on your web server and application will do both the jobs for you in 4 steps below:

Creating dummy certificate
- Run: cd /usr/lib/jvm/java-6-openjdk-i386/jre/bin/
- Run: keytool -genkeypair -alias MyCertificate -keyalg RSA -keystore "/home/myhome/MyCertificate.cert"
Here, we used Java's keytool application to generate a self-signed certificate.
Enter all the information asked further: password, name, organization, etc.
This will generate a SSL certificate file, containing encrypted text.
Enabling SSL on your tomcat server
- Run: nano /var/lib/tomcat6/conf/server.xml
- Search for commented…