Tomcat systems are very customizable. The directory location and naming of the individual files needed vary depending on your personalized system. Below are generalized instructions.
We will start by assuming that you have already successfully installed the SSL certificate on the one Tomcat web server.
To move your SSL certificate keystore from one Tomcat system to another perform the following.
Step 1: Exporting/backing up your keystore of the first system:
- On the first Tomcat server search and open the Tomcat server.xml file.
- Open the server.xml config file using a text editor (ie. JAKARTA_HOME/conf/server.xml)
Search for the secure element in your config file (try searching for SSL Connector). - Your keystore file name and path is listed under KeystoreFile, and its Password is under keystorePass.By default it should look something like this:
Note: Remember the KeystorePass as it will be required to configure your backed up keystoreFile on the second Tomcat server. - Go to the location directory of your keystoreFile and make a copy/save of this file and store it on an alternate drive or USB flash. You will move this file to the second Tomcat server.You have now made a backup copy of your SSL keystore on the first Tomcat server.
Step 2: Configuring SSL keystore on the second Tomcat server:
- After moving your backed up SSL keystore to the second system. On the Tomcat second server search and open the Tomcat server.xml file.
- Open the server.xml config file using a text editor (ie. JAKARTA_HOME/conf/server.xml)
Search for the secure element in your config file (try searching for SSL Connector). By default it should look something like this: - you will move your backed up keystore file to the location of the keystoreFile change the attributes to reference the location, name, and password of your backed up SSL keystore.
Note: These directories and names will differ your environment may vary.
- keystoreFile=”c:\PATH TO mycert.jks”
- keystorePass=”password of mycert.jks”
- Save the changes.
- Stop and Start Tomcat.
Your SSL Certificate/Keystore is now installed, and the website is now configured.
Tomcat Support
For more information refer to Tomcat
If this article is helpful, please share it.