Using NGINX for SSL with Tomcat 8.x for Vaadin Applications

I have read through a lot of documentation and tried to implement it, but at the final step I get a popup in the browser:

Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=8.0.7

It is looking for the file in the root folder (as provided in the NGINX config.

This only happens with https. http traffic works fine (which I plan to redirect to https once https is functional). I have gone through other forum questions, but this is as far as I got.

Is there a definitive guide to do this (because VAADIN requires special handling)? FYI, I am trying to do all this is AWS EC2 box with NGINX and Tomcat. Will these problems go away if I use an AWS ELB and install the SSL Certificate there? It will be more money out of my pocket, but at this point I am ready to try anything.

To followup, I installed the SSL Certificate at AWS ELB and setup targets to point to the EC2 instances with Vaadin application and now HTTPS works like a breeze with no issues.

But I would still like to know how to make it work with a NGINX since I need to do other things like URL masking etc.

There shouldn’t be anything special from Vaadin’s side. Are you serving static resources normally through Vaadin servlet? IF so, and it works in plain http, I bet there is something wrong in your nginx config. You could verify this using browsers debugging features and see whether the failed response for vaadinBootstrap.js is given by nginx or Vaadin servlet.


I am 100% sure I am doing something wrong in NGINX config. Was hoping to find a NGINX template for a pure Vaadin application to compare and see what I am doing wrong.

Guru Murty, did you solve your problem? I’m stuck in problems with NGINX + Tomcat and nodoby can help

I was running short on time, so I decided to use a combination of AWS Route 53 and Application Load Balancer (pointing to a security group that hosts tomcat servers) along with some application logic and that works without issues. Costs a little bit more money, but you cannot have everything in life.

I will revisit this one of these days when I have time.

Hi, I’ll set up a banchmark environment with HAProxy in replace of nginx and see if I get better results.