Skip to content

Instantly share code, notes, and snippets.

@berkayunal
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berkayunal/d69ceca597122955cc1e to your computer and use it in GitHub Desktop.
Save berkayunal/d69ceca597122955cc1e to your computer and use it in GitHub Desktop.
haproxy acl is not matched sometimes
I have a strange problem, sometimes haproxy cannot match the host so it cannot use the backend and connections is being aborted in the browser.
Do you know any solutions for this kind of problem.
I am using HA-Proxy version 1.5.13 2015/06/23
You can see the problem on http://blog.ganipara.com with firebug or similar.
Here is a screenshot also:
http://berkayunal.com/share/sc_1B4AF7FE.png
Some requests are being dropped since hostname does not matches.
If i add a like as "default_backend wwwother" into "frontend http-in" it works.
Thanks
Below is my config.
global
log /dev/log local0
log /dev/log local1 notice
maxconn 4096
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults
log global
option dontlognull
option http-server-close
option httpclose
#option redispatch
retries 3
timeout connect 5000
timeout client 10000
timeout server 10000
frontend http-in
bind *:80
acl host_blog hdr(host) -i blog.mydomain.com
use_backend wwwother if host_blog
backend wwwother
mode http
option httplog
option httpclose
option http-server-close
option forwardfor except 127.0.0.1
balance first
server node-1 10.133.157.XXX:80 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment