This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
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!
 
Greenhorn
Posts: 15
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!