I'm trying to set up two Apache ProxyPass rules to direct to different Nexus servers. What I want is:
http://mainserver/nexus
-> http://server1:8080/nexus
and
http://mainserver/nexus-pro
-> http://server2:8081/nexus
I had it set up to work with our original server, but adding a second rule causes requests for nexus-pro to redirect to the main apache server with /nexus, which then forwards on to the wrong server, thus:
http://mainserver/nexus-pro
-> http://mainserver/nexus
-> http://server1:8080/nexus
I imagine this is something Nexus is doing itself, but I'm not really in control of that.
Here is my current Apache config, what do I need to change?
ProxyPass /nexus http://server1:8080/nexus
ProxyPassReverse /nexus http://server1:8080/nexus
ProxyPass /nexus-pro http://server2:8081/nexus
ProxyPassReverse /nexus-pro http://server2:8081/nexus
ProxyPreserveHost On