Reverse proxy to 2 sites

Alles, was den Apache betrifft, kann hier besprochen werden.

Reverse proxy to 2 sites

Postby revprox » 13. January 2016 02:44

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 params: /see/launch. Can anybody help me with how I can solve this issue?
revprox
 
Posts: 1
Joined: 13. January 2016 02:28
Operating System: Windows

Return to Apache

Who is online

Users browsing this forum: No registered users and 4 guests