In the current code you can't reverse proxy to virtual hosts or any other host that relies on a host header because the original host header is deleted and a new host header is created using the proxy's idea of the hostname. This patch creates a config option called ProxyPreserveHost which allows you to tell apache to send the original host header instead of a new one.
Might anyone else be interested in this patch or is my case unique? It's really only useful during reverse proxying and not during regular proxying so do you think that I should only enable the option if ProxyRequests is not on? Or, better yet, should I detect if a certain proxied request is reverse and not regular and only then preserve the original host header? If so, then what's a good way to distinguish the reverse from the regular proxied request? Additionally, I'll may be using this in a production environment so I'd really appreciate knowing of any potential bugs that anyone might see. Anyone have any other suggestions? - Gabriel Russell (See attached file: proxy-preserve-host.diff)
proxy-preserve-host.diff
Description: Binary data
