logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Reverse Proxy: Backend Redirect Issue
Author
flyingmonkey



Joined: 01 Aug 2007
Posts: 15

PostPosted: Wed 01 Aug '07 19:11    Post subject: Apache Reverse Proxy: Backend Redirect Issue Reply with quote

Hi All,
I've setup a secure reverse proxy to a backend portal server, but am having issues handling backend redirects. I believe the backend portal server uses J2EE. The login page loads, it catches and warns if the password is incorrect, but if the password is correct it does not redirect correctly.

Here's a "diagram" of my environment:
Client --SSL--> Reverse Proxy (domain.com) --NonSSL--> Portal Server (internal.com)

The client accesses https://www.domain.com/internal/abc/xyz/ which serves http://www.internal.com:50500/abc/xyz/. www.internal.com will be protected by SSL in the future.

The goal is to have the reverse proxy rewrite all www.internal.com links to the www.domain.com:50500/internal format, so the client does not know about www.internal.com.

When Portal Server redirects, it redirects the client from http://www.domain.com/internal/abc/xyz/ to just http://abc/xyz/. It's missing the www.domain.com/internal part. Sad

How do I keep the client at www.domain.com/internal and not expose www.internal.com without modifying the www.internal.com site? Is there something I need to change in my configuration?

This is what I currently have configured in the Apache conf:

Code:

ProxyPass /internal http://www.internal.com:50500/
ProxyHTMLURLMap http://www.internal.com:50500 https://www.domain.com/internal

<Location /internal>
        ProxyPassReverse /
        ProxyPassReverse http://www.internal.com:50500
        SetOutputFilter  proxy-html
        ProxyHTMLURLMap  / /internal/
        ProxyHTMLURLMap  /internal /internal/
        RequestHeader    unset  Accept-Encoding
</Location>


Sorry, if this is an easy question; I just started using Apache for less than week.

Thanks for your help in advance!

-Flying Monkey
Back to top
flyingmonkey



Joined: 01 Aug 2007
Posts: 15

PostPosted: Fri 03 Aug '07 19:32    Post subject: Reply with quote

I got it! The application redirected temporary to some middle page at http://www.internal.com:50500/hij/ during the login proccess which was not caught by the reverse proxy.
Back to top


Reply to topic   Topic: Apache Reverse Proxy: Backend Redirect Issue View previous topic :: View next topic
Post new topic   Forum Index -> Apache