choose server backend to some URL with haproxy
- by shingara
To some URL I don't want use some server. So use other.
Actually I have this haproxy configuration.
global
daemon
log 127.0.0.1 local0
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
balance roundrobin
stats enable
stats refresh 5s
stats auth admin:123abc789xyz
# Set up application listeners here.
listen application 0.0.0.0:10000
server localhost 127.0.0.1:10100 weight 1 maxconn 5 check
server externe 127.0.0.1:10101 weight 1 maxconn 5 check
By example I want all url to /users be served only by server localhost, not by externe.