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: Reverse proxy to 2 sites with same path
Author
revprox



Joined: 13 Jan 2016
Posts: 1

PostPosted: Wed 13 Jan '16 18:52    Post subject: Reverse proxy to 2 sites with same path Reply with quote

I have a need where I need to reverse proxy to 2 different hosts with the same parameters.

https://revprox.com/int/see/launch should reverse proxy to https://interal.com/see/launch

https://revprox.com/ext/view/launch should reverse proxy to https://external.com/see/launch

I have the following configuration in the config file:

<Location /int/>
ProxyPass https://internal.com/
ProxyPassReverse https://internal.com/
ProxyHTMLEnable On
ProxyHTMLURLMap / /int/
RequestHeader unset Accept-Encoding
</Location>
<Location /see>
ProxyPass https://internal.com/see/
ProxyPassReverse https://internal.com/see/
</Location>

<Location /ext/>
ProxyPass https://exteral.com/
ProxyPassReverse https://external.com/
ProxyHTMLEnable On
ProxyHTMLURLMap / /ext/
RequestHeader unset Accept-Encoding
</Location>
<Location /view>
ProxyPass https://external.com/see/
ProxyPassReverse https://external.com/see/
</Location>

I initially tried it without the location entries for /see and /view, but it did not work. Adding those 2 works in a way. The issue is when I go to the second request https://revprox.com/ext/view/launch, it's reverse proxied to the first one https://internal.com/see/launch. I believe it's because of both the URLs having the same path: /see/launch. Can anybody help me with how I can solve this issue?
Back to top


Reply to topic   Topic: Reverse proxy to 2 sites with same path View previous topic :: View next topic
Post new topic   Forum Index -> Apache