FAQ
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.

Search Discussions

  • Nick Kew at Nov 7, 2007 at 9:49 pm

    On Wed, 7 Nov 2007 16:40:49 -0500 "Van Nguyen" 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesapache
postedNov 7, '07 at 9:39p
activeNov 7, '07 at 9:49p
posts2
users2
websitehttpd.apache.org
irc#httpd

2 users in discussion

Nick Kew: 1 post Van Nguyen: 1 post

People

Translate

site design / logo © 2022 Grokbase