Willy!
As you are probably aware, recently there was a mail quoted below, asking
about the redirect feature. It encouraged me to think a little more about
it, so: shouldn't we rather put the feature into use_backend chain instead
of "req allow/deny/block"? This would simply allow to do something like:
--- cut here ---
use_backend www_php4 if payment
redirect prefix https://pay.xxx.bg if pay_xxx
default_backend www_php4
--- cut here ---
instead of:
--- cut here ---
use_backend www_php4 if payment
redirect prefix https://pay.xxx.bg if pay_xxx !payment
default_backend www_php4
--- cut here ---
It would also allow to create more complicated rules, without duplicating
whole "use_backend xxx if abc" section, which is sometimes *very*
complicated, into "req allow if abc".
What is your opinion?
Best regards,
Krzysztof Olędzki
---------- Forwarded message ----------
Date: Fri, 6 Feb 2009 12:28:22 +0200
From: Georgi Georgiev <[email protected]>
To: [email protected]
Subject: HaProxy ACL
Hi to all,
I?d like to create acl path match in my frontend section
The configuration is :
frontend test_one
bind 192.168.63.10:80
mode http
log global
clitimeout 300000
maxconn 10000
acl payment path_beg /payments/
acl pay_xxx hdr_beg(host) -i pay.xxx.bg
acl pay_xxx hdr_beg(host) -i www.pay.xxx.bg
use_backend www_php4 if payment
redirect prefix https://pay.xxx.bg if pay_xxx
capture request header Host len 20
default_backend www_php4
So problem here is that when user access http://pay.xxx.bg/payments/xxxxx it
always goes to redirect option ?
How can I managed that ?