virtualMachinetomcat

Enable SSL access over HTTPS with Tomcat

You can configure Apache Tomcat to enable SSL access to applications using HTTPS. It is necessary to configure Tomcat with the location of the Apache SSL certificate, as described below.

  • Check that the certificate file is present at /opt/bitnami/tomcat/conf/ssl/tomcat.cert.pem and the certificate key file is present at /opt/bitnami/tomcat/conf/ssl/tomcat.key.pem.

  • Uncomment the following line in the /opt/bitnami/tomcat/conf/server.xml file:

      <Connector port="8443"
                  protocol="HTTP/1.1" SSLEnabled="true"
                  maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                  enableLookups="false" disableUploadTimeout="true"
                  acceptCount="100" scheme="https" secure="true"
                  clientAuth="false" sslProtocol="TLS"
                  keystoreFile="conf/myKeystore"
                  keystorePass="your_password"
                  SSLCertificateFile="/opt/bitnami/tomcat/conf/ssl/tomcat.cert.pem"
                  SSLCertificateKeyFile="/opt/bitnami/tomcat/conf/ssl/tomcat.key.pem"/>
    
  • Restart the Apache Tomcat server

You should now be able to access your Web applications over HTTPS by browsing to https://SERVER-IP:8443.

Last modification December 21, 2022