0

I'm trying to enable SSL on Tomcat on GCE.

  1. I installed Let's Encrypt certificate by following this:

https://certbot.eff.org/#ubuntutyakkety-apache

  1. Scanned the certificate here:

https://www.ssllabs.com/ssltest/analyze.html?d=mydomain.com

it checks out.

  1. Configured tomcat by following this:

https://community.letsencrypt.org/t/how-to-use-the-certificate-for-tomcat/3677

Connector in my server.xml looks like this:

<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" 
           URIEncoding="UTF-8" maxThreads="150" SSLEnabled="true" scheme="https"
           secure="true" clientAuth="false" sslProtocol="TLS"
           keystoreFile="/home/me/certs/MyKeystore.jks" 
           keystorePass="password" keyAlias="tomcat" keyPass="password"/>

After restarting Tomcat, when I go to https + ://www.mydomain.com the browser doesn't trust the cert, and it says

The requested URL was not found on this server.

What am I missing in my setup? Port 443 is enabled under firewall rules, and I have `Allow HTTPS traffic' checked. If I don't include this connector the URL can be accessed via HTTP.

ikcodez
  • 323
  • 2
  • 16
  • Also, running `openssl s_client -connect localhost:443` says CONNECTED and I can see the certificate. – ikcodez Apr 14 '17 at 00:22

2 Answers2

0

in your google cloud plataform >> google compute engine, in properties of your VM, enable HTTPS in Session FIREWALL

0

Depending on the Tomcat version you are using some thing change, for example if you are using a version of Tomcat prior to Tomcat 7, you need to change "keystorePass" to "keypass". You are using both, I would try following the official documentation Tomcat 6.0 - 7.0 - 8.0.

You can also check this other thread where you can find the steps to enable HTTPS protocol of your Apache service on Google Compute Engine.

Watacroft
  • 322
  • 2
  • 11