----- dfw-apa...@white.u-net.com wrote:

> On Thu, Feb 03, 2011 at 11:00:25PM +0000, Igor Gali?? wrote:
> > ----- dfw-apa...@white.u-net.com wrote:
> > > I've hit a vexing impasse with mod_proxy_balancer.
> > > 
> > > I have a pool of backend boxes. They vhost many domains, so
> > > need the specific Host: header in requests to them (the *same*
> > > Host: header for all of them)
> > > 
> > > I proxy requests to them potentially thousands of times a second, 
>  
> > > and their IP's are not going to be changing, so I name the
> > > BalancerMembers by IP address, as the DNS lookup overhead is 
> > > a fatal waste of CPU, especially if your DNS servers melt
> > > and your site dies unnecessarily. (No, /etc/hosts is not
> possible.
> > 
> > http://httpd.apache.org/docs/current/mod/mod_proxy.html#startup
> 
> That only mentions ProxyBlock. We do not use ProxyBlock. Also, when
> we
> lost DNS, we lost the site, so reality has the last word regardless.

duh. Sorry, must've been late yesternight, I didn't give it my full
attention.

> > > The sitename has multiple A records, and I make the backends
> choose
> > > individualiseable vhosts. Besides, my hosts file is vast!)
> > > 
> > > Unfortunately, when I try and use mod_headers to set the Host:
> header
> > > for these backend connections, the balancer layer destroys the
> > > result and replaces it with the IP.
> > > 
> > > Apparently, if I switch ProxyPreserveHost on, I may get further,
> > > but since that's a site-wide setting a side effect would mean all
> > 
> > Not quite sure what you mean by site-wide, but:
> >
> http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypreservehost
> > says: Context:      server config, virtual host

In trunk proxypreservehost can be put in *any* context.

> > But ProxySet only allows you to set the same Variables as
> > ProxyPass does. host is none of them.
> 
> Indeed. This appears to be the problem. Such an option is missing.

Right now I'm looking into 2.2's source to see how to add an option
preservehost=(on|off).

Can you please test:
http://people.apache.org/~igalic/patches/mod_proxy-preserve_host.diff

duh.. nodocumentationpatch!
But I'm pretty sure you can guess how to use it ;)

> DFW

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to