On Fri, Jun 04, 2010 at 09:37:26AM +0100, Laurie Young wrote:
> Excellent - this may be what we need
> 
> Can I do further http swittching in the backend (based on hostnames) or can
> this only be done in the front end?

only a frontend can switch to a backend. However you can combine the
operations if needed :

   frontend xxxx
       bind :80
       mode tcp
       option tcplog
       tcp-request inspect-delay 5s
       tcp-request content accept if HTTP
       acl site1 hdr(host) -i www.site1.com
       use_backend http_backend if HTTP site1
       default_backend tcp_backend

Or alternatively you can get rid of the TCP connections earlier and
only process HTTP :

   frontend xxxx
       bind :80
       mode tcp
       option tcplog
       tcp-request inspect-delay 5s
       tcp-request content accept if HTTP
       use_backend tcp_backend if ! HTTP
       # now we only have HTTP
       use_backend http_site1 if { hdr(host) -i www.site1.com }
       use_backend http_site2 if { hdr(host) -i www.site2.com }

Willy


Reply via email to