Create a keystore, import the Secure Socket Layer (SSL)
certificate, and edit the conf/server.xml file
to define a connector for SSL on Apache Tomcat.
About this task
Follow the steps in this procedure to configure SSL on Apache
Tomcat. See
SSL Configuration HOW-TO for more details
and examples of configuring SSL for Apache Tomcat.
Procedure
- Create a keystore for your web server. You can
use the Java™ keytool command
to create a keystore.
keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/keystore.jks
- Import the SSL certificate and the corresponding chain
certificate into your keystore by following the instructions provided
by the certificate authority.
- Edit the conf/server.xml file to define
a connector to use SSL. This connector must point to your
keystore.
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/path/to/keystore.jks"
keystorePass="mypassword" />
- Restart the web server. Now you can access
the web server by https://myserver:8443/...