The redirect works but not correctly...
and the default mode is http
root@haproxy2:~# haproxy -vv
HA-Proxy version 1.5.9 2014/11/25
Copyright 2000-2014 Willy Tarreau <[email protected]>
Build options :
TARGET = linux2628
CPU = native
CC = gcc
CFLAGS = -O2 -march=native -g -fno-strict-aliasing
OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1
Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200
Encrypted password support via crypt(3): yes
Built with zlib version : 1.2.3.4
Compression algorithms supported : identity, deflate, gzip
Built with OpenSSL version : OpenSSL 1.0.1 14 Mar 2012
Running on OpenSSL version : OpenSSL 1.0.1 14 Mar 2012
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports prefer-server-ciphers : yes
Built with PCRE version : 8.12 2011-01-15
PCRE library supports JIT : no (USE_PCRE_JIT not set)
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT
IP_FREEBIND
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 3 (3 usable), will use epoll.
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
tune.ssl.default-dh-param 2048
#log 127.0.0.1 local2
log 192.168.249.201 local2
#log 192.168.249.131 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 58000
ulimit-n 120000
user haproxy
group haproxy
daemon
nbproc 16
stats bind-process
# turn on stats unix socket
stats socket /var/lib/haproxy/stats level admin
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
#
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 5s
timeout client 2m
timeout server 2m
timeout http-keep-alive 10s
timeout check 10s
maxconn 400
#stats enable
#stats auth
#stats uri /admin?stats
-----Original Message-----
From: Lukas Tribus [mailto:[email protected]]
Sent: Thursday, May 5, 2016 11:00 PM
To: Haim Ari <[email protected]>; [email protected]
Subject: Re: redirect rule with multiple conditions
Hi Haim,
Am 05.05.2016 um 21:24 schrieb Haim Ari:
>
> Hello,
>
> I'm trying to set a redirect rule with multiple conditions:
>
> Redirect any request unless from ip or path begin with...
>
Please show your complete configuration including the default and global
section and an output of haproxy -vv.
You have to be in "mode http" and a non-tunnel http-mode. haproxy won't touch
the headers or redirect if in TCP mode.
Lukas