• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat 8.5.4 HTTPS, can't get the site to run under HTTPS  RSS feed

 
Stuart Martin
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm a real noob when it comes to Tomcat so I apologise in advance! I'm having a real issue trying to get a web application to run under HTTPS. I've followed the Apache Tomcat 8.5.4 guide on how to configure SSL, but I just keep getting errors. To the point where I blew the server away and have tried again.

My issue seems to be getting a definitive answer with how the server.xml file should be configured. I see a lot about filling in the <connector> tag but then the guide speaks of those commands being deprecated and run inside the <SSLHostConfig> tag. I had issues with the keystore being tampered with or incorrect password, then a duplicate hostname being present, once I sorted that (at least thought I had!) the apache server starts but when I try to hit the site on https://<site>:8443 it just spins and never starts. After the rebuild I have the duplicate hostname:  "Multiple SSLHostConfig elements were provide for the host name [_default_]. Host names must be unique". Below is an example of what I have in server.xml:


<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation with the JSSE engine. When
         using the JSSE engine, the JSSE configuration attributes must be used.
    -->

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
   clientAuth="false" sslProtocol="TLS">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="c:\keystore\.keystore"
                         certificateKeystorePassword="password"
hostName="<server_FQDN>"/>

    </SSLHostConfig>
    </Connector>


Any examples would be greatly appreciated! I just can't seem to find out exactly how the whole section should look?

Thanks!
 
Quincy Schmidt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case you haven't got this to work yet, I just figured it out:
https://coderanch.com/t/681099/Tomcat-SSL-config-Tomcat#3195283
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!