users@glassfish.java.net

Re: Apache proxy + Glassfish = redirect issues

From: <glassfish_at_javadesktop.org>
Date: Mon, 15 Feb 2010 06:59:34 PST

I changed the context root on the Glassfish server to be that WAR/EAR, but that isn't necessarily what I want to do.

I created a name-based virtual host in Glassfish for myapp.mydomain.com and changed my Apache conf to look like this:

ServerName myapp.mydomain.com
ProxyRequests Off
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyTimeout 300
ProxyHTMLURLMap http://127.0.0.1:8080/ http://myapp.mydomain.com/
ProxyPreserveHost On

From what I understand, ProxyPreserveHost should pass myapp.mydomain.com back to Glassfish, so that it will hit the name-based virtual server. Something appears to not be working.
[Message sent by forum member 'gabeosx' (gabeosx_at_yahoo.com)]

http://forums.java.net/jive/thread.jspa?messageID=386781