Install SSL Certificate on Tomcat Web Server

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Tomcat Web Server: SSL Certificate Installation Procedure

To successfully install your SSL Certificate on Tomcat Web Server, you need to configure the root (SSL) certificate, intermediate/primary certificate, and private key within the appropriate keystore.

  • Download Certificate Files
  • Import Root Certificate
  • Import Intermediate Certificate
  • Install SSL Certificate

Tomcat SSL Installation

Perform the following steps when installing the SSL certificate on Tomcat Web Server.

Install SSL Certificate into the Keystore ->

Step 1: Download And Extract SSL Certificate

After order completion, Certificate Authority (CA) will send an email containing a *.zip file which includes the root, intermediate, & primary certificate files. Download and extract the files on the Tomcat Web Server directory where the Keystore was added during the Certificate Signing Request (CSR) generation process.

Note: SSL certificate will work only with the same keystore, which was created during the CSR generation process. Also, make sure to install all certificate files in the correct order on the keystore.

Step 2: Import Root Certificate File

During the process of installing the SSL certificate to the keystore, the password required is the same one that you created during the CSR generation process. Now, to import the Root certificate file, enter the following command/code:

keytool -import -trustcacerts -alias root -file RootCertFileName.crt -keystore keystore.key

After entering this command, if you receive a message that says “Certificate already exists in system-wide CA Keystore under alias <…> Do you still want to add it to your own Keystore? [no]:” then select Yes.

If this process is successfully completed, it will display this message: “Certificate was added to Keystore”.

Step 3: Import Intermediate Certificate File

Add the following command/code to import the intermediate certificate file:

keytool -import -trustcacerts -alias intermediate -file IntermediateCertFileName.crt -keystore keystore.key

If this process is successfully completed, it will display this message: “Certificate was added to Keystore”.

Step 4: Installing the Primary Certificate File

Add the following command/code   install the primary certificate file:

keytool -import -trustcacerts -alias tomcat -file PrimaryCertFileName.crt -keystore keystore.key

If this process is successfully completed, it will display this message: “Certificate was added to Keystore”.

After installing the SSL Certificate file into your keystore, the next step is the ‘Server Configuration’ for using the Keystore file.

SSL Connector Configuration ->

Note: Configuration of ‘SSL Connector’ must be required for Tomcat to accept a secure connection.

In the system’s home directory, Tomcat is mainly looking for the Keystore with file name ‘.keystore’ with default password as ‘changeit’. On Unix and Linux systems, the home directory will be /home/user-name/ and for Microsoft windows systems C:\Documents and Settings\user-name\. Users can change the file location and password if required.

1. Copy Keystore file (your-domain-name.key) into the home directory
2. Now, using any text-editor open …~/conf/server.xml file.
3. If necessary, uncomment the SSL connector.
4. Locate the SSL connector for which the new Keystore will be used. Make sure the Connector Port is 443.
5. During configuration of SSL connector, add the exact location of Keystore file name and also the correct KeystorePass.
6. If the Tomcat version is 7.0.X or 8.0.X, then replace the KeystorePass with Keypass

Once the connector configuration process is finished, it will  look something like this:

<Connector className=”org.apache.catalina.connector.http.HttpConnector” port=”8443″ minProcessors=”5″ maxProcessors=”75″ enableLookups=”true” acceptCount=”10″ debug=”0″ scheme=”https” secure=”true”><Factory className=”org.apache.catalina.net.SSLServerSocketFactory” clientAuth=”false” protocol=”TLS” keystoreFile=”/working/mykeystore” keystorePass=”password”/>

7. Save the server.xml file and restart Tomcat server.

With this step, the SSL certificate gets successfully installed on Tomcat Web Server.

Resources:

Before Installing the SSL

green pad lockTomcat Server only accepts SSL Certificate from a genuine and trusted SSL Certificate Authority. Buy trusted SSL Certificate from at a cheap price with heavy discount rates.

Buy SSL Certificate starts at $5.88 Per Year – 89% Off

Install SSL Certificate on NGINX HTTP Server
How to Install an SSL Certificate on Red Hat Linux Apache Server
This entry was posted in SSL Installation Guides by Mit Gajjar. Bookmark the permalink.

About Mit Gajjar

I have been working as SSL security expert for 6 years and i have assisted to plenty of users to solve their technical issues while installation of SSL certificates on their web servers. It’s really great experience working with Platinum Partner Company CheapSSLSecurity to offer the most reliable SSL certificate security solution on the internet. Being Platinum Partner Company of Symantec, GeoTrust Thawte, Comodo, and RapidSSL, CheapSSLSecurity offers the cheapest SSL certificates security on the internet which starts at just only $3.20/yr.