Re: Can HAProxy do that?

From: Aleksandar Lazic <al-haproxy#none.at>
Date: Thu, 8 Jul 2010 20:04:04 +0200


Dear Mikael,

yes it is possible with haproxy.

On Die 06.07.2010 21:40, zabrane Mikael wrote:
>Hi List,
>
>I'm new to HAProxy, so please apologize if the question was already
>asked before.
>
>I've a homemade web server running on my internat. It works like this.

[snipp]

>So, my question is simple:
>
>Could I tell HAProxy to inspect the HTTP headers, and decide:
>
>a. If the special header "X-RAWDATA: ..." doesn't exists, let the
>request go to the live Web directly.

acl host_live hdr(X-RAWDATA)

>b. Otherwise, forward the request to my webserver.

use_backend live if host_live
# if not use default_backend servers

http://haproxy.1wt.eu/download/1.4/doc/configuration.txt 7.5.3. Matching at Layer 7

A example of such a setup could be found in

haproxy-1.4.8/examples/acl-content-sw.cfg

Hth

Aleks Received on 2010/07/08 20:04

This archive was generated by hypermail 2.2.0 : 2010/07/08 20:15 CEST