On Sun, Aug 7, 2011 at 1:15 AM, Chris McDonough <chr...@plope.com> wrote:
> On Sat, 2011-08-06 at 22:56 +0200, Eric Lemoine wrote:
>> >
>> > In what configuration would it be sane to have any proxy set the
>> Host
>> > header to anything except what the client user agent says the Host
>> > header is?
>>
>> Here's what the Apache doc says about the ProxyPreserveHost directive:
>>
>> """
>> When enabled, this option will pass the Host: line from the incoming
>> request to the proxied host, instead of the hostname specified in the
>> proxypass line.
>>
>> This option should normally be turned Off. It is mostly useful in
>> special configurations like proxied mass name-based virtual hosting,
>> where the original Host header needs to be evaluated by the backend
>> server.
>> """
>
> I think the wording of this warning in the Apache docs is a little
> misleading.

I admit that I don't understand what "proxied mass" exactly means.

> There's no reason for the Host header to *not* be passed
> to the backend server, especially if one of the main purposes in life of
> the Apache server is to be a frontend for the application being proxied
> to.  Having it Off is a poor default, IMO.

How about this case:

The backend server has two virtual hosts, one serving "app1" and the
other one serving "app2". The proxy server makes "app1 and "app2"
available at http://proxy.com/app1 and http://proxy.com/app2,
respectively. In that case you cannot have the proxy pass the Host
header, because the backend server wouldn't be able to determine if
the request should be directed to "app1" or "app2".

This use case doesn't seem so unrealistic to me.


--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to