AnsweredAssumed Answered

Apache2 in between browser and virtualization tomcat server

Question asked by tvaughan77 on Jan 8, 2009
Latest reply on May 8, 2009 by tvaughan77
Hi,

I have an Apache2 httpd server in between my users and the virtualization server.  To allow apache to proxy virtualization requests, I changed the alfresco-virtserver.properties to:
* use the machine's ip address instead of 127.0.0.1
* declare the virtualization port as "80" (which isn't actually what virtual-tomcat is running on, but seems to be used only to construct the virtualization url)

When they try to preview their website, they get URLs like:

http://admin.myapp.www--sandbox.111-22-33-44.ip.alfrescodemo.net/   ….   or ….
http://john.myapp.www--sandbox.111-22-33-44.ip.alfrescodemo.net/   ….   or ….
http://mary.myapp.www--sandbox.111-22-33-44.ip.alfrescodemo.net/   ….   or ….

All I want to do is rewrite and proxy those URLs to port :8180 on the same server, but I don't know how to cleanly do that with Apache…there's probably a really simple solution using RewriteRule with the [P] flag, but I'm not sure what it is.

If I do this on a per-user basis, it works…but how can I generalize this solution?

ServerName john.myapp.www–sandbox.111-22-33-44.ip.alfrescodemo.net
ProxyPass / http://john.myapp.www--sandbox.111-22-33-44.ip.alfrescodemo.net:8180/
ProxyPassReverse / http://john.myapp.www--sandbox.111-22-33-44.ip.alfrescodemo.net:8180/

Outcomes