Hi,
I got two configurations the should do the same. One is based on a
frontend/backend layout the second does it with just listen. The listen
configuratiuon is working fine but the fontend/backend causes a problem
on the backend. It looks like some request string is missing because the
customer application is not able to resolve some lookup which seems to
be header related. Is anybody able to tell me whats the difference in
these two configurations?
========================================
global
log /dev/log local6
#log /dev/log local6 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 50000
stats socket /var/run/haproxy.sock mode 600 level admin
stats timeout 2m
defaults
log global
mode http
option dontlognull
option dontlog-normal
retries 2
option redispatch
timeout connect 5000
timeout client 50000
timeout server 120000
timeout http-request 5000
timeout http-keep-alive 5000
option http-server-close
http-check disable-on-404
http-send-name-header X-Target-Server
default-server minconn 1024 maxconn 4096
monitor-net 192.168.xxx.xxx/32
listen application9000 0.0.0.0:9000
balance leastconn
mode tcp
option tcplog
option httpchk GET /check.php HTTP/1.0
http-check expect string Hello World
server xcmsphp01.xxx 10.0.4.4:9000 check port 80
server xcmsphp02.xxx 10.0.4.7:9000 check port 80
server xcmsphp03.xxx 10.0.4.3:9000 check port 80
listen application80 0.0.0.0:80
balance roundrobin
option forwardfor
option httplog
monitor-uri /haproxymon
option httpchk GET /index.html HTTP/1.1\r\nHost:\
monitoring\r\nConnection:\ close
http-check expect string Welcome home
acl site_dead nbsrv lt 2
monitor fail if site_dead
server xcmsfrontend01.xxx 10.2.2.1:80 check
server xcmsfrontend02.xxx 10.2.2.2:80 check
========================================
global
log /dev/log local6
#log /dev/log local6 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
maxconn 50000
stats socket /var/run/haproxy.sock mode 600 level admin
stats timeout 2m
defaults
log global
mode http
option dontlognull
option dontlog-normal
retries 2
option redispatch
timeout connect 5000
timeout client 50000
timeout server 120000
timeout http-request 5000
timeout http-keep-alive 5000
default-server minconn 1024 maxconn 4096
monitor-net 192.168.xxx.xxx/32
frontend http-in
bind *:80
option http-server-close
option forwardfor
option httplog
monitor-uri /haproxymon
acl site_dead nbsrv(http-out) lt 2
monitor fail if site_dead
default_backend http-out
backend http-out
balance roundrobin
http-send-name-header X-Target-Server
option forwardfor
option http-server-close
#option accept-invalid-http-response
http-check disable-on-404
option httpchk GET /index.html HTTP/1.1\r\nHost:\
monitoring\r\nConnection:\ close
http-check expect string Welcome home
server xcmsfrontend01.xxx 10.2.2.1:80 check
server xcmsfrontend02.xxx 10.2.2.2:80 check
frontend php-in
bind *:9000
mode tcp
option tcplog
http-send-name-header X-Target-Server
default_backend php-out
backend php-out
balance leastconn
mode tcp
option tcplog
http-send-name-header X-Target-Server
option httpchk GET /up.php HTTP/1.0
http-check expect string Hello World
server xcmsphp01.xxx 10.0.4.4:9000 check port 80
server xcmsphp02.xxx 10.0.4.7:9000 check port 80
server xcmsphp03.xxx 10.0.4.3:9000 check port 80
========================
Regards,
Florian