You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Van Nguyen <vn...@ur.com> on 2007/11/07 22:40:49 UTC

[users@httpd] ProxyPass // ProxyPassReverse question

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.


Re: [users@httpd] ProxyPass // ProxyPassReverse question

Posted by Nick Kew <ni...@webthing.com>.
On Wed, 7 Nov 2007 16:40:49 -0500
"Van Nguyen" <vn...@ur.com> wrote:

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

It looks as if you're struggling towards
http://www.apachetutor.org/admin/reverseproxies

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org