> For the complete documentation index, see [llms.txt](https://docs.certinext.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.certinext.io/documentation/certificate-installation-guides/installing-on-tomcat.md).

# Installing on Tomcat

Installing an SSL certificate on Tomcat involves several steps, including generating or obtaining the certificate, configuring Tomcat to use the certificate, and securing the server. Here's a step-by-step guide for installing an SSL certificate on Tomcat.

**Prerequisites**

* To convert your .cer into different file formats, Utilize our eMudhra utility tool to seamlessly transform your files into .cer, .pfx (.p12), .jks, or .pem formats, and conveniently import zip files using our CSR tool.

For details on specific configuration options please refer to the [official Tomcat documentation for SSL.](https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html)

* Make sure that OpenSSL is installed on the target machine or container along with Java and Tomcat before continuing.
* Place the three files mentioned above in a directory where Tomcat can read them and set the permissions. In the next steps we'll use the directory /certs - please change the path accordingly.
* Edit the "server.xml" file.
* Make sure that it contains a line like this:

  > `<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />`
* Next adapt the existing SSL listener in the same server.xml file or add a new one - don't forget to change the path accordingly:

```
 <Connector port="8443" 
protocol="org.apache.coyote.http11.Http11AprProtocol" 
maxThreads="150" SSLEnabled="true" >
    <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
  <SSLHostConfig>
          <Certificate certificateKeyFile="/cert/private.key" certificateFile="/cert/certificate.crt" certificateChainFile="/cert/ca_bundle.crt" type="RSA" />
    </SSLHostConfig>
 </Connector>
```

* If you want Tomcat to listen on another port than 8443 please change port="8443" to a value that suits you
* If you don't want to offer Http/2 you can omit the line \<UpgradeProtocol .../>

**4. Check Installation**

You have completed all the required steps to install your SSL certificate. Verify that the SSL certificate is correctly installed by accessing your website or service using HTTPS. After installing your certificate, it is a good practice to test your SSL setup using various online tools to ensure everything is working correctly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.certinext.io/documentation/certificate-installation-guides/installing-on-tomcat.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
