apache configuration for hybris

632 Views Asked by At

I have one webserver and two hybris servers. For example:

webserver - http://10.0.0.1
Hybris - http://10.0.0.2:9001 and http://10.0.0.3:9001

Now I want to use webserver as a load balancer to redirect the requests. Redirecing is working fine but during redirect it exposes the hybris IP which I dont want. I want to expose the webserver IP to public.

How I can write the redirect rule for that. Any help is highly appreciated.

Thanks,

1

There are 1 best solutions below

0
On

Basically, you want to have the following in your apache configuration:

<Proxy balancer://cluster>
BalancerMember http://10.0.0.2:9001 route=node1
BalancerMember http://10.0.0.3:9001 route=node2
</Proxy>

ProxyPass / balancer://cluster/
ProxyPassReverse / balancer://cluster/

By using a proxy like this it will be transparent to the user which ip is being served. See more information on how to configure hybris to worh with Apache in the official documentation here.