I am using Apache HTTP server as a front end to JBoss.  I have my
application deployed as:

 

http://internal.domain.com/foobar

 

If I type in that URL, it works as expected.  Going to that page will
forward you to a login on page
(http://internal.domain.com/foobar/global/login.do).  This virtual host
will only be accessible internally.

 

I want to set up another virtual host on the same server (which will be
accessible from the outside world) and give it this URL:

 

http://public.domain.com/foobar_public

 

This is where I'm running into difficulties.  

 

I added this into my <VirtualHost ...> section:

ProxyPass /foobar_public ajp://localhost:8009/foobar

ProxyPassReverse /foobar_public ajp://localhost:8009/foobar

 

That did not work.  It gives me:

 

Not Found

The requested URL /csapp/ was not found on this server.

 

If I then add these lines to the <VirtualHost ...> section

ProxyPass /foobar_public ajp://localhost:8009/foobar

ProxyPassReverse /foobar_public ajp://localhost:8009/foobar

ProxyPass /foobar ajp://localhost:8009/foobar

ProxyPassReverse /foobar ajp://localhost:8009/foobar

 

That works... but I want it to keep the /foobar_public context.

 

So I added a RewriteRule:

RewriteRule ^/foobar/(.*) /foobar_public/$1 [R]

 

Now it does what I want... When I type in
http://public.domain.com/foobar_public... it sends me to the appropriate
login page.  BUT... the login action is /foobar/global/login.do...
instead of /foobar_public/global/login.do.

 

My jsp:

 

<html:form action="/global/login.do" focus="username">

 

Can someone shed any light to what I might be doing wrong?

 

I know this is a little long and somewhat confusing... but any help
would be great!  Thanks in advance.

Reply via email to