----- dfw-apache@xxxxxxxxxxxxxxx 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 reqeusts 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 > 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 > of my other proxied directories would now get the wrong Host: header. > All the RewriteRule [P]'s would break and I would have to catch and Waaaait a sec. You're using mod_rewrite for proxying? Why? (http://bash.org/?866112) > replace the Host in every single one of them in individual <Proxy> > blocks. > That deluge of perpetual kludgery does not appeal. > > What I need is a way to tell a ProxyPass or BalancerMember, that > they should use a certain Host: header in its communications > with this backend. e.g. > BalancerMember http://10.0.0.1/foo/ host=foobar.com Now I'm confused. How do your configs actually look like? > The logical alternative would have been to be able to specify a > certain target IP to connect to instead of a certain Host name > to use e.g. > BalancerMember http://foobar.com/foo/ address=10.0.0.1 > > but I suspect apache would then be unable to set <Proxy> block > rules for individual balancer members since they'd all declare > the same URL and you'd be unable to match them individually You can use ProxySet http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset in <Proxy > and <BalancerMember > But ProxySet only allows you to set the same Variables as ProxyPass does. host is none of them. > So, I currently can't use my backends in mod_proxy_balancer > > Does anyone have any suggestions? Paste(bin) youur config or enough of it, that we can deduce what you're trying to do and how. > DFW i -- Igor GaliÄ Tel: +43 (0) 664 886 22 883 Mail: i.galic@xxxxxxxxxxxxxx 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-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx