Re: HA Proxy as Amazon S3 Content Switch

From: John Singleton <>
Date: Mon, 29 Sep 2008 10:52:53 -0700

Hi Willy,

Thanks again for your response.

On Sep 28, 2008, at 1:21 PM, Willy Tarreau wrote:

> On Sun, Sep 28, 2008 at 12:59:18PM -0700, John Singleton wrote:
>>> Also, is it possible that the server simply does not accept your
>>> Host: header ?
>> I have no idea :) How could I check/debug this?
> When you telnet into the server port, add "Host:"
> before
> the empty line. If it fails, it means the server is picky about the
> hostname.
>> Should I be rewriting the host headers?
> If the test above fails, yes, you'll have to.

Okay, I added the following line just after the other regular expression:

reqrep ^Host:\ .* Host:

Which, in my estimation, should rework the host line, no? Tried this but still no luck. I do, however, get a different error. Rather than tell me the bucket <hostname> doesn't exist, it tells me that a hashed key (which looks like an actual bucket hash) so something is happening.

Am I doing that host line correctly?


>>> Do you also have "option httpclose" on the other backend ? It would
>>> be possible
>>> that the static request is always sent as part of a keep-alive
>>> connection
>>> directed to the dynamic backend instead of being switched to the
>>> static one.
>>> In doubt, you should set "option httpclose" in the frontend.
>> It is, in fact. I just tried it on the frontend as well, but no luck.
> OK.
>> The only notable weirdness is that when I get an error back, the
>> error
>> says "no such bucket" and then indicates the hostname as the bucket I
>> was trying to access---which is not the case. So for example, if I
>> try
>> to access, it says "No Such
>> Bucket:" when in fact I am trying to access the bucket
>> content-
>> cache. So something is clearly getting mangled.
> It still might be that it refuses requests for and only
> accepts
>> I should note that I also tried this exact same setup with another
>> CDN
>> service, (very fast, global, pay as you go CDN) and it
>> doesn't work either. In the CacheFly setup, I structured the
>> directories so that I didn't need to rewrite the URLs---so clearly
>> rewriting the URL isn't the problem here, but rather some general
>> problem that prohibits it from working with CDN setups. Doing it with
>> a web server on the backend (apache, lighttpd) works flawlessly.
> I would say it's heading towards a Host: issue :-/
> I hope it's just that, in which case it'll be an easy config fix.
> Regards,
> Willy
Received on 2008/09/29 19:52

This archive was generated by hypermail 2.2.0 : 2008/09/29 20:01 CEST