I think I’ve found the issue. During test, I’m visiting a hostname 
http://example/. But the acl condition req.hdr_ip(host) will only work if I  
visit http://192.168.0.1/.

Is it possible to let haproxy resolve the domain name and then check the IP 
address?

> Op 29 mrt. 2015, om 14:04 heeft Abdelouahed Haitoute <ahaito...@rinis.nl> het 
> volgende geschreven:
> 
> Hello,
> 
> I’m trying to route http-requests based on destination IP address. I’ve got 
> the following configuration, but unfortunately its not working:
> 
> frontend proxy :3128
>       acl host_destip req.hdr_ip(host) 192.168.0.1
>       use_backend a if host_destip
>       default_backend b
> 
> I’m expecting all http-traffic with destination IP address 192.168.0.1 to go 
> to backend a, but its using the default_backend.
> 
> Any help is welcome.


Reply via email to