To ensure a secure communication environment, you can configure Secure Sockets
Layer (SSL) support on Apache Tomcat.
You are recommended to configure Apache Tomcat with SSL support only when running Tomcat
as standalone web server. It is not necessary to configure SSL support when Apache
Tomcat runs behind another web server such as Apache.
Before you begin
You have a keystore file containing a self signed certificate for SSL. For more
information about how to generate a keystore file, see How to generate a keystore file.
Procedure
-
Browse to the <TomcatPath>\conf directory, and then
open the server.xml file.
-
Uncomment the following text.
<!--
<Connector port="8543" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
-
Add the information of the complete path to the keystore file and the password
for the keystore file.
<Connector port="8543" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
Warning: Make sure that the keystoreFile
contains the path and file name of the keystore, and
the keystorePass
matches the password for the
keystore.
-
Save your changes into the file.
-
Restart Apache Tomcat to take into account your updates.