How to Set up HTTPS SSL on Tomcat



How to Set up HTTPS SSL on Tomcat

How to Set up HTTPS  SSL on Tomcat

Apache Tomcat, often referred to as Tomcat Server, is an open-source Java Servlet Container developed by the Apache Software Foundation (ASF). Tomcat implements several Java EE specifications including Java Servlet, JavaServer Pages (JSP), Java EL, and WebSocket, and provides a “pure Java” HTTP web server environment in which Java code can run.

This Tomcat Tutorial will show you how to set up HTTPs on Tomcat using a self signed cert.

We are running tomcat on windows in this tutorial but the process should be much the same for tomcat if it is installed on Linux.

In this tomcat tutorial we first generate the self signed cert by using the in built Java keytool. To so we first navigate into the JAVA_HOME bin folder and run the command to generate the certificate.

Next we configure Tomcat Serer to use SSL. We open the server.xml file and add in the configuration to ensure tomcat will work over https by adding the ssl configuration.

We then restart tomcat to ensure that the changes have been picked up.

Next we navigate to tomcat over https to ensure that it is working.

In our case we check localhost https://localhost:8443

All commands and relevant code blocks are available here:

https://darrenoneill.eu/?p=772

Comments are closed.