@mpande wrote:
Hello ,
I am using haproxy where my requirement is same host but different paths.
http://hostaaa/x/
http://hostaaa/y/And I am using below settings in haproxy.cfg
*************************************************************************************************************8
frontend main *:80acl url_x path_beg /x/
acl url_y path_beg /y/use_backend x-backend if url_x
use_backend y-backend if url_y#---------------------------------------------------------------------
static backend for serving up images, stylesheets and such
#---------------------------------------------------------------------
backend static
balance roundrobin
server static 127.0.0.1:4331 check#---------------------------------------------------------------------
round robin balancing between the various backends
#---------------------------------------------------------------------
backend x-backend
reqrep ^([^\ ])\ /x(/.) \1\ \2
cookie SERVERID insert indirect nocache
server x_0 host1:80 check cookie x_0
server x_1 host2:80 check cookie x_1
server x_2 host1:80 check cookie x_2backend y-backend
reqrep ^([^\ ])\ /y(/.) \1\ \2
cookie SERVERID insert indirect nocache
server y_server0 hostaaa:8080 check cookie y_server0
hostaaa is also part of backend y-backend.
Appreciate support!!
Thanks
Regards,
M
Posts: 1
Participants: 1