---
title: SSL installation in Tomcat
description: This Blog talks about SSL installation in Tomcat.
---

[![e-Zest logo\_An accion lab company\_Colour](https://blog.e-zest.com/hubfs/images/Logos%20with%20Tagline/Corporate/SVG/e-Zest%20logo_An%20accion%20lab%20company_Colour.svg "e-Zest logo_An accion lab company_Colour")](https://www.e-zest.com/)

- [WORK](https://www.e-zest.com/our-work)
- [SERVICES](https://www.e-zest.com/our-services) 
    - [Product Engineering](https://www.e-zest.com/digital-product-engineering-services)
    - [Enterprise Data Services](https://www.e-zest.com/enterprise-data-services)
    - [Digital Commerce](https://www.e-zest.com/digital-commerce-services)
    - [Digital Operations](https://www.e-zest.com/digital-operations)
    - [Digital Consulting](https://www.e-zest.com/digital-transformation-consulting-services)
    - [Digital Experience Design](https://www.e-zest.com/digital-experience-design)
- [INSIGHTS](https://blog.e-zest.com/)
- [CAREERS](https://www.e-zest.com/careers)
- [ENTERPRISE DATA SERVICES](https://www.e-zest.com/enterprise-data-services)
- [GENERATIVE AI](https://www.e-zest.com/generative-ai)
- [Healthcare](https://healthcare.e-zest.com)
- [Contact Us](https://www.e-zest.com/contact-us)

- ![Elevating Product Engineering with AI and ML](https://blog.e-zest.com/hubfs/Elevating%20Product%20Engineering%20with%20AI%20and%20ML.jpg)

  [BLOGS](https://blog.e-zest.com)
  
  #### Elevating Product Engineering with AI and ML

  As technology evolves and customer choices broaden, there is an increasing ...

  [Read more](https://blog.e-zest.com/elevating-product-engineering-with-ai-and-ml)
- ![e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024](https://blog.e-zest.com/hubfs/e-Zest%20%E2%80%93%20An%20Accion%20Labs%20Company%20-%20Gets%20Recognition%20as%20a%20Contender%20in%20the%20ISG%20Provider%20LensTM%20Study%20on%20Digital%20Engineering%20Services%202024.jpg)

  [NEWS](https://blog.e-zest.com/news)
  
  #### e-Zest – An Accion Labs Company gets Recognition as a Contender in the ISG Provider Lens™ Study on Digital Engineering Services 2024

  We are delighted to announce that e-Zest – An Accion Labs Company has been ...

  [Read more](https://blog.e-zest.com/news/e-zest-an-accion-labs-company-gets-recognition-as-a-contender-in-the-isg-provider-lens-study-on-digital-engineering-services-2024)
- ![e-Zest Solutions supports Digital Pune Mission](https://blog.e-zest.com/hubfs/blog-files/Digital%20Literacy%20Bus%20e-Zest.png)

  [CSR](https://blog.e-zest.com/csr)
  
  #### e-Zest Solutions supports Digital Pune Mission

  **Pune, India:** e-Zest Solutions, a leading digital technology innovation ...

  [Read more](https://blog.e-zest.com/csr/e-zest-solutions-supports-digital-pune-mission)

- [Work](https://www.e-zest.com/our-work)
- [Services](https://www.e-zest.com/our-services)
- [Insights](https://blog.e-zest.com)
- [Careers](https://www.e-zest.com/careers)
- [Enterprise Data](https://www.e-zest.com/enterprise-data-services)
- [Generative AI](https://www.e-zest.com/generative-ai)
- [Innovations](https://www.e-zest.com/innovations)
- [Healthcare](https://healthcare.e-zest.com)
- [About](https://www.e-zest.com/about-us)
- [Contact](https://www.e-zest.com/contact-us)

- [Blog](https://blog.e-zest.com/)
- [News](https://blog.e-zest.com/news)
- [CSR](https://blog.e-zest.com/csr)

- [![Linkedin Icon](https://blog.e-zest.com/hubfs/icons/linkedin_icon_white.svg)](https://www.linkedin.com/company/e-zest-solutions/)
- [![Twitter Icon](https://blog.e-zest.com/hubfs/twitter-logo-silhouette%20(5).svg)](https://twitter.com/ezest)
- [![Facebook Icon](https://blog.e-zest.com/hubfs/facebook-app-logo%20(4).svg)](https://www.facebook.com/61259256638)
- [![Instagram Icon](https://blog.e-zest.com/hubfs/instagram-logo%20(4).svg)](https://www.instagram.com/ezestsolutions/)
- [![Youtube Icon](https://blog.e-zest.com/hubfs/icons/youtube_icon_white.svg)](https://www.youtube.com/user/ezestcorporate)

[![Go to top icon](https://blog.e-zest.com/hubfs/AA%20Assets/top%20button.svg)](https://blog.e-zest.com/ssl-installation-in-tomcat#top)

Hit enter to search or ESC to close

Insights

e-Zest members share technology ideas to foster digital transformation.

- [Blog](https://blog.e-zest.com)
- [News](https://blog.e-zest.com/news)
- [Podcasts](https://www.e-zest.com/podcasts)
- [Healthcare](https://blog.e-zest.com/healthcare)
- [CSR](https://blog.e-zest.com/csr)
- [Whitepaper](https://blog.e-zest.com/whitepaper)
- [Playbook](https://blog.e-zest.com/playbook)
- [Media Kit](https://www.e-zest.com/media-kit)

# SSL installation in Tomcat

[Priya Benade](https://blog.e-zest.com/author/priya-benade)  Dec 23, 2015

[Blogs](https://blog.e-zest.com/topic/blogs) [Technology](https://blog.e-zest.com/topic/technology)

- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/ssl-installation-in-tomcat&title=&summary=&source=>
- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/ssl-installation-in-tomcat&text=SSL%20installation%20in%20Tomcat>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/ssl-installation-in-tomcat>
- <https://www.instagram.com/ezestsolutions/?u=https://blog.e-zest.com/ssl-installation-in-tomcat>

**How to generate a CSR in Tomcat**

We can use keytool command to generate and manage Keystore file.  Go to the path where you want to manage the Keystore and certificates.

                                Command is useful to generate CSR:

**$JAVA\_Home/bin/ keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore your\_site\_name.jks**

It will prompt for the keystore password .The default is **changeit** (provide the password which you want to set)

Then it will ask for the below information:

**Note**: **If you want Wildcard Certificate then domain name must begin with the \* character. (Example: \*.domainname.com)**

- **First and Last Name**— the fully-qualified domain name, or URL, you're securing. If you are requesting a Wildcard certificate, add an asterisk (\*) to the left of the common name where you want the wildcard, for example ***\*.domainname.com***
- **Organizational Unit**— *Optional*. If applicable, enter the DBA name in this field.

A company is said to be "doing business as (DBA)" when the name under which they operate their business differs from its legal, registered name. 

- **Organization**— the full legal name of your organization. The listed organization must be the legal registrant of the domain name in the certificate request. If you are enrolling as an individual, please enter the certificate requestor's name in **Organization**.
- **City or Locality**— Name of the city in which your organization is registered or located — do not abbreviate.
- **State or Province**— Name of state or province where your organization is located — do not abbreviate.
- **Country Code**— the two-letter International Organization for Standardization (ISO) format country code for where your organization is legally registered.

After you have completed the required information confirm that the information is correct by entering 'y' or 'yes' when prompted. Next you will be asked for your password to confirm.

**Note: Make sure to remember the password you choose.**

Now keystore file named your\_site\_name.jks is now created in your current working directory.

**Generate a CSR from Your New Keystore**

1. We can use keytool to create the Certificate Signing Request (CSR) from Keystore.

Enter below command:

**keytool -certreq -alias server -file csr.txt -keystore your\_site\_name.jks**

1. Type the keystore password that you chose/entered earlier and then press **Enter (keyword)**.
2. Your CSR file with name csr.txt is created in your current directory.
3. Open the CSR with a text editor, and copy and paste the text (including the BEGIN and END tags) into your SSL provider and get the certificate and be careful to save the keystore file (**jks**) as your certificates will be installed to it later.

**Tomcat Web Server SSL Certificate Installation**

1. Download your[SSL Certificate](https://www.digicert.com/ssl-certificate.htm) file (your\_domain\_name.p7b) to the directory where you saved your keystore during the CSR creation process.
2. If you used our[keytool CSR command generator](https://www.digicert.com/easy-csr/keytool.htm) to generate your CSR, the keystore is called your\_site\_name.jks.
3. **Note**:  
    You must install the SSL Certificate file to the same keystore and under the same alias name (i.e. "server") that you used to generate your CSR. If you try to install it to a different keystore, the install command in the next step will not work.
4. To install the SSL Certificate file to your keystore, use the following command:

**keytool -import -trustcacerts -alias server -file your\_site\_name.p7b -keystore your\_site\_name.jks**

1. You will get a confirmation stating as "Certificate reply was installed in keystore."
2. If asked if you want to trust the certificate, choosey or yes
3. Your keystore file (**jks**) is now ready to be used on your Tomcat Server. Need to configure your server to use the keystore
4. Before Tomcat can accept secure connections, you need to configure an SSL Connector
5. Open the Tomcat **xml** file in any text editor (**server.xml** file is usually located in the **conf** folder from your Tomcat's home directory)
6. Locate the connector that you want to use the new keystore to secure
7. A connector with the port number 443 or 8443
8. Specify the correct keystore filename and password in connector configuration
9. **xml** settings are as below:

                 \<Connector port="80" protocol="HTTP/1.1"

 connectionTimeout="20000   

  URIEncoding="UTF-8"

 redirectPort="443" /\>

                 \<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"

                  maxThreads="150" scheme="https" secure="true"

                 clientAuth="false"

                 sslProtocols="TLS"

                 keystoreFile="/home/user\_name/your\_site\_name.jks"

                  keystorePass=" your\_keystore\_password"

                   compression="force" /\>

1. Save the changes in server.xml file.
2. Then Restart Tomcat.

- <https://twitter.com/intent/tweet?source=https://blog.e-zest.com/ssl-installation-in-tomcat&text=SSL%20installation%20in%20Tomcat>
- <https://www.facebook.com/sharer/sharer.php?u=https://blog.e-zest.com/ssl-installation-in-tomcat>
- <https://www.linkedin.com/shareArticle?mini=true&url=https://blog.e-zest.com/ssl-installation-in-tomcat&title=&summary=&source=>

### Similar Blog

[Why should I write (blogs)? I have always wondered what it must be like for a technical person to be immersed in, almost neck-deep in developing, ... By Madhavi Vaidya Jun 16, 2014](https://blog.e-zest.com/why-should-i-write-blogs/)

[![Installation of SVN](https://blog.e-zest.com/hubfs/Svn%201.png) Installation of SVN Subversion is software which help developers to work together and to maintain complete work history. Developers can modify, add ... By Priya Benade Mar 02, 2017](https://blog.e-zest.com/installation-of-svn)

[How to install S3cmd and command to use s3cmd **s3cmd** is a command line utility used for creating s3 buckets, uploading, retrieving and managing data to Amazon s3 storage. Let’s ... By Priya Benade Mar 03, 2015](https://blog.e-zest.com/how-to-install-s3cmd-and-command-to-use-s3cmd/)

[![How to add SSH users in Amazon Linux](https://blog.e-zest.com/hs-fs/file-3586007745-jpg/blog-files/add-ssh-users-in-amazon-linux.jpg) How to add SSH users in Amazon Linux **What Is SSH?** By Priya Benade May 20, 2013](https://blog.e-zest.com/how-to-add-ssh-users-in-amazon-linux/)

## Helping Organizations Thrive in the Digital Age

[Contact Us](https://www.e-zest.com/contact-us)

- [About](https://www.e-zest.com/about-us)
- [Services](https://www.e-zest.com/our-services)
- [Work](https://www.e-zest.com/our-work)
- [Insights](https://blog.e-zest.com/)
- [Healthcare](https://healthcare.e-zest.com/)
- [Accion Labs](https://www.accionlabs.com/)

- <https://www.linkedin.com/company/e-zest-solutions/>
- <https://twitter.com/ezest>
- <https://www.facebook.com/eZest/>
- <https://www.instagram.com/ezestsolutions/>
- <https://www.youtube.com/user/ezestcorporate>

- Dallas
- Detroit
- Hannover
- Vienna
- London
- Pune

 © 2025 e-Zest Solutions

- [Privacy Policy](https://www.e-zest.com/privacypolicy)
- [Cookie Policy](https://www.e-zest.com/cookie-policy)

 Contact us

 Contact us

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.