Best practice under Proxy

I have created several Spring Vaadin apps, deployed on the same Tomcat server.
I have an Apache web server with ProxyPass mapping subdomains in that way:

http://app1.mydomain.com/http://10.0.0.2:8080/app1/
http://app2.mydomain.com/http://10.0.0.2:8080/app2/

The issue comes when Vaadin Javascript tries to access vaadinServlet under an invalid path:

http://app1.mydomain.com/[b]
app1
[/b]/vaadinServlet

It should be instead:

http://app1.mydomain.com/vaadinServlet

This because the
serviceUrl
declared into the HTML of the page is pointing to
/app1/vaadinServlet
instead of just /
app1/vaadinServlet
.

A dirty fix could be adding an additional ProxyPass entry to map also
/app1
under
http://app1.mydomain.com/app1/
but I am wondering which would be the right way of doing this.

Up!