Only in proxy/: Makefile
diff -u proxy.orig/mod_proxy.c proxy/mod_proxy.c
--- proxy.orig/mod_proxy.c	Mon Sep 24 14:14:27 2001
+++ proxy/mod_proxy.c	Thu Jan 24 09:03:20 2002
@@ -889,6 +889,17 @@
     {NULL}
 };
 
+static const char *
+    set_preserve_host(cmd_parms *parms, void *dummy, int flag)
+{
+    proxy_server_conf *psf =
+    ap_get_module_config(parms->server->module_config, &proxy_module);
+
+    psf->preserve_host = flag;
+    psf->preserve_host_set = 1;
+    return NULL;
+}
+
 static const command_rec proxy_cmds[] =
 {
     {"ProxyRequests", set_proxy_req, NULL, RSRC_CONF, FLAG,
@@ -931,6 +942,8 @@
      "Force a http cache completion after this percentage is loaded"},
     {"ProxyVia", set_via_opt, NULL, RSRC_CONF, TAKE1,
      "Configure Via: proxy header header to one of: on | off | block | full"},
+    {"ProxyPreserveHost", set_preserve_host, NULL, RSRC_CONF, FLAG,
+     "on if we shoud preserve host header while proxying"},
     {NULL}
 };
 
diff -u proxy.orig/mod_proxy.h proxy/mod_proxy.h
--- proxy.orig/mod_proxy.h	Fri Oct  5 02:19:15 2001
+++ proxy/mod_proxy.h	Thu Jan 24 09:04:21 2002
@@ -224,6 +224,8 @@
     char viaopt_set;
     size_t recv_buffer_size;
     char recv_buffer_size_set;
+    int preserve_host;			/* true if we should preserver the host header */
+    char preserve_host_set;
 } proxy_server_conf;
 
 struct hdr_entry {
diff -u proxy.orig/proxy_http.c proxy/proxy_http.c
--- proxy.orig/proxy_http.c	Fri Oct  5 11:46:39 2001
+++ proxy/proxy_http.c	Thu Jan 24 09:12:25 2002
@@ -310,10 +310,12 @@
     ap_hard_timeout("proxy send", r);
     ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr, " HTTP/1.0" CRLF,
 	   NULL);
-    if (destportstr != NULL && destport != DEFAULT_HTTP_PORT)
-	ap_bvputs(f, "Host: ", desthost, ":", destportstr, CRLF, NULL);
-    else
-	ap_bvputs(f, "Host: ", desthost, CRLF, NULL);
+    if (!conf->preserve_host_set) {
+        if (destportstr != NULL && destport != DEFAULT_HTTP_PORT)
+	    ap_bvputs(f, "Host: ", desthost, ":", destportstr, CRLF, NULL);
+        else
+	    ap_bvputs(f, "Host: ", desthost, CRLF, NULL);
+    }
 
     if (conf->viaopt == via_block) {
 	/* Block all outgoing Via: headers */
@@ -346,7 +348,8 @@
     for (i = 0; i < reqhdrs_arr->nelts; i++) {
 	if (reqhdrs[i].key == NULL || reqhdrs[i].val == NULL
 	/* Clear out headers not to send */
-	    || !strcasecmp(reqhdrs[i].key, "Host")	/* Already sent */
+            /* Don't send the old Host header unless we have specified to */
+	    || (!strcasecmp(reqhdrs[i].key, "Host") && !conf->preserve_host_set)
 	    /* XXX: @@@ FIXME: "Proxy-Authorization" should *only* be 
 	     * suppressed if THIS server requested the authentication,
 	     * not when a frontend proxy requested it!
