users@glassfish.java.net

Apache ProxyPass with Glassfish

From: Michael Mellinger <mmellinger66_at_gmail.com>
Date: Tue, 10 Mar 2009 19:28:56 -0400

I'm using the ProxyPass feature in Apache2 to redirect to Glassfish for my
JSP and Grails apps. This works fine until I need to redirect /.If I do
this then everything gets sent to the Glassfish server. I want to have cgi
apps and plain HTML dirs servered up by Apache. How can I accomplish this?

NameVirtualHost *:80

<VirtualHost *:80>
ProxyPass /foo http://localhost:8080/foo
ProxyPassReverse /foo http://localhost:8080/foo
Redirect /foo http://localhost:8080/foo
ErrorLog /tmp/foo-error_log
CustomLog /tmp/foo-access_log common
#
ProxyPass /bar http://localhost:8080/bar
ProxyPassReverse /bar http://localhost:8080/bar
Redirect /bar http://localhost:8080/bar
ErrorLog /tmp/bar-error_log
CustomLog /tmp/bar-access_log common
#
# ******** This is a PROBLEM *********
#
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
Redirect / http://localhost:8080/
ErrorLog /tmp/a-error_log
CustomLog /tmp/a-access_log common
</VirtualHost>

-Mike