How to Configure SSL HTTPS in Tomcat within 2 mins
Configuration of SSL HTTPS in tomcat in Linux involves 2 easy steps. Creating the Keystore using keytool utility and configure in the tomcat server.xml file.
Short Intro about SSL – Secure Socket Layer :-
SSL, or Secure Socket Layer, is a technology which allows web browsers and web servers to communicate over a secured connection. This means that the data being sent is encrypted by one side, transmitted, then decrypted by the other side before processing. This is a two-way process, meaning that both the server AND the browser encrypt all traffic before sending out data.
Lets start with the configuration of SSL HTTPS in Tomcat.
Pre-requite is to have Java to be installed. Lets check that in the server by issuing this command,
# java -version java version "1.7.0_91" OpenJDK Runtime Environment (amzn-126.96.36.199.63.amzn1-x86_64 u91-b00) OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
If Java is not installed, Please follow the article for Installation of Java JDK for Linux flavors such as RHEL or CentOS.
Step 1:- Creating the KeyStore file using keyGen Utility of Java
# cd %JAVA_HOME/bin
then type-in the keytool command,
# keytool -genkey -alias Tomcat -keyalg RSA
Shell will prompted to ask few details about Keystore as follows