AnsweredAssumed Answered

Name Virtualhost scenario

Question asked by matutano6 on Feb 27, 2014
Latest reply on Mar 12, 2014 by matutano6

Hi,
I'm trying to configure a name based virtualhost with Apache Web Server doing reverse proxy to Tomcat where the Activiti Explorer is deployed.

The "important" part of web server configuration is as follows:

ProxyPass /activiti-explorer/ http://127.0.0.1:8080/activiti-explorer/
ProxyPassReverse /activiti-explorer/ http://127.0.0.1:8080/activiti-explorer/

With that configuration, I tried to mask the application context path, but the context path is present in many parts of the response:


vaadin.vaadinConfigurations["activitiexplorerui-1528442030"] = {appUri:'/activiti-explorer/ui', standalone: true, themeUri:"/activiti-explorer/VAADIN/themes/activiti", versionInfo :

So I decide to expose the application context path with the following configuration:

ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/

but a following problem arises: the action URL of the login form has an absolute URL indicating protocol, host and port:

<form id="loginf" method="post" onkeypress="submitOnEnter(event)" target="logintarget" action="http://127.0.0.1:8080/activiti-explorer/ui/1/loginHandler">

When I try to login, the browser gets a "404 Not Found" (seen with firebug) because that URL does not match the virtualhost (in fact, it neither reaches the web server).

I tried using "ProxyPreserveHost On" (that makes the reverse proxy to include the Host: header with the appropriated hostname in the HTTP request made to Tomcat) and using the hostname on the ProxyPass and ProxyPassRevers URLs with the same results.

¿Is there any way to configure Activiti Explorer to use relative URLs as much as possible? At least, I need to eliminate full absolute URLs and can handle with full path relative URLs (i.e. starting from /activiti-explorer/...).

Thanks in advance!
M.

Outcomes