Fronting Tomcat with Apache2

I’d like to place an Apache2 web server in front of the Tomcat server running the Vaadin application. I’ve got this in the apache2 config file:

ProxyPass /myApp http://localhost:8080/myApp/
ProxyPassReverse /myApp htp://localhost:8080/myApp

The app works fine with connecting directly to the tomcat server, but fails when proxied by apache2. It eventually fails by trying to retrieve something in myApp/VAADIN, which I assume is dynamically created vaadin content that the apache2 server is not correctly handling.

What do I need to do to configure apache2 to front the tomcat server containing my app?

I usually use the following config for proxying Tomcat with Apache2:

RewriteEngine On
RewriteRule ^/myapp(.*) http://127.0.0.1:8080/myapp$1 [L,P]

ProxyPassReverse /myapp http://127.0.0.1:8080/myapp

Cheers, Maik

First, I would be carefully review the reserved URL you have
ProxyPass /myApp http://localhost:8080/myApp/
ProxyPassReverse /myApp htp://localhost:8080/myApp

The 2nd URL doesnt have the trailing “/” and that is pretty significant.

Second, I would probably go with AJP for apache-tomcat. AJP is much more performant comparing to just http proxy.