HAproxy to web host sub directory?
- by daemonza
Hi for reasons outside my control, I need to load balance two servers, that run a non-virtual host enabled app on IIS.
Normally in HAProxy I would load balance servers(apache, tomcat, etc) like this :
acl is_www_example_com hdr_end(host) -i www.example.com
use_backend www_example_com if is_www_example_com
backend www_example_com
balance roundrobin
cookie SERVERID insert nocache indirect
option httpchk HEAD / HTTP/1.0
option httpclose
option forwardfor
server node1 192.168.1.1:80 cookie node1
server node1 192.168.1.2:80 cookie node1
Which will route to the node 1 and node 2 server and serve up the virtual host site.
if I need to route to www.example.com/application/data
How would I be able to do it, with the above example, if at all even possible?