How to rename the 'frontend' directory?

We have two Vaadin 14.1.x apps running on a virtual machine. They are Spring Boot applications, and we use Maven for
dependency management.

One app runs on 8080 and the other on 9090. Both are sitting behind an apache server which is proxying requests
(forward and reverse) to the backend. The problem we are encountering is that the static resources are located in the
absolute directory /frontend on each, so when a service worker attempt to get an icon (for instance), it will look
in /frontend/icons/icon.png. However, this is the same on both apps, so there is no way for Apache to know which
one to use.

Current structure is:


Ideally, I’d like to have /app1/frontend and /app2/frontend as the top levels, so that they can be correctly proxied, but
I’ve tried nearly every maven goal change, application-properties change, and directory layout change I can think of
without success, and there is not clear guidance in the docs of how to rename the frontend.

Any help would be greatly appreciated.


I did a little googling and found this stackoverflow discussion:

I don’t think this is so much of a Vaadin problem, but how to deploy multiple spring boot apps. Here’s the most prominent suggestions that I found. Which one is right depends on your preferences.

  • Switch self contained jar to wars and deploy them on a single server like tomcat. putting app1.war and app2.war in tomcat will give you :8080/app1 and :8080/app2 urls, and give you performance boosts as you don’t have to spin up two separate JVM’s.
  • Deploy them on two completely different servers to get two urls. and
  • On one server, put up virtual servers with e.g. Docker, and put a web server/load balancer like nginx in front of the self container jars. Then the apps will be deployed under and, but nginx can map calls to and to the virtual servers without the end user noticing.