How to configure SSL in Tomcat8 using ubuntu 16.04 - TechBeginner

Welcome to TechBeginner.in, Tech Beginner provides technical blog for Online Linux Tutorials, Ubuntu Tutorials, Redhat Tutorials and CentOS 7, Configuration of server like Web Server, Application server, Database server, Window server, networking, html, css, java script, php, wordpress, opencart, magento, joomla and etc.

How to configure SSL in Tomcat8 using ubuntu 16.04

Share This

With this post, We Will install and configure Self Sign SSL with Tomcat 8 uisng ubutnu 16.04/18.04

Generating Keystore 

Step 1:- First you need to generate the keystore by following commands with root privileges.

sudo -i
keytool -genkey -alias Your_domain_here -keyalg RSA -keystore /etc/pki/keystore

Adding ssl code in Tomcat's server.xml 

Step 2:- After this, You need to edit /opt/tomcat/conf/server.xml file to add given param to configure ssl

nano /opt/tomcat/conf/server.xml

Paste the given ssl parameter

<Connector port="8443" protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="443"
                SSLEnabled="true"
                scheme="https"
                secure="true"
                sslProtocol="TLS"
                keystoreFile="/etc/pki/keystore"
                keystorePass="_password_" />

And save and exit from nano editor

Restart the Tomcat service

Step 3:- To get effect of ssl changes, You need to restart the Apache Tomcat services by following the commands

systemctl restart tomcat.service

No comments:

Post a Comment