Apache HTTP + Tomcat + HTTPS (SSL/TLS)


I often have to deploy my JAVA application to tomcat with HTTPS communication. There is simple step-by-step guide.


  • Linux machine (Ubuntu 14.04 in my case)
  • Installed and working Apache 2 HTTP server (http://localhost:80/ works in your browser)
  • Installed Tomcat 7 server (http://localhost:8080/ works in your browser)
  • Installed Oracle JAVA (JDK)

What we will do in the guide ?

  • Generate self-signed certificate for server
  • Install self-signed certificate to Apache
  • Configure AJP connection between Apache and Tomcat at URL (https://localhost)

Read More

Java – How to fix SSL exception


When you open any connection protected by SSL/TLS (e.g. https), JAVA verify if connection is trusted. If server use self signed certificate or certificate from not know authority JAVA close connection and throws some kind of SSL exception like “javax.net.ssl.SSLHandshakeException”

You can solve this situation by two ways, you can install authority certificate or trust all certificates (disable SSL validation).

Read More