Wednesday 16 July 2014

Configure HTTPS(Self Signed Certificate) on Tomcat


Step1 : First, uses “keytool” command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in the certificate’s detail. 




Above, the “imfluxkeystore” is the certificate file that gets created at location “d:\”.
 Press Enter, following options will be shown. Provide password and leave the rest of the options blank by pressing enter.






  













Step2 : Secondly, configure conf/server.xml of Tomcat to treat 8080 port as secured port.
To do this, comment out existing <connector> tags having port as 8080. After this, uncomment existing <connector> tag having port as 8443. Modify this with port 8080 and add property like “keystoreFile” and “keystorePass” (this password is the one that you entered in Step1).



Step3 : Saved it and restart Tomcat, then access https://localhost:8080/YOUR_APPLICATION_NAME