> if only you posted this a week or two ago
> it might have made it into the 1.3.23 release.
Oh, well.
> I'm looking at the patch, and i'm not all that familiar
> with the 1.3 tree. it looks like if the option is set you
> don't set the host AT ALL.
Yea, we don't set the host. In the 1.3.22 proxy all the headers just get
passed through except for Host and Proxy-Authorization in one piece of code
and then a new Host header gets sent in a later piece of code. So, the
replacement of the original host header with a new host header is done in
two steps. It's not elegant. The replacement or not replacment of the Host
header "shoud" be done in one place, but I wasn't really looking to recode
a bunch of header infrastructure.
>I'm assuming that this is because it is set already.
>would it be cleaner if you set the host in this section
>+ 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);
>+ }
> else {
> ap_bputs(f, "Host: ", <current
v-host>:<current-port>,CRLF,NULL);
> }
> the reason I'm asking is due to server aliasing. you could any number of
host's
> coming in from the user which match a particular vhost setting.
I could (set|see)? any number of hosts coming in from the ... ?
> the other question I have about the patch is would it be better if this
was a regex
> expression
>eg.
>s/www.(.*).com/ws.$1.com/
In this case would the vhost name be www.$1.com or ws.$1.com?
What I really want to do is analogous to:
RewriteRule ^/(.*\.jsp) http://jspserver.website.com/$1 [P,L]
RewriteRule ^/search97/(.*) http://verityserver.website.com/search97/$1
[P,L]
and then I want to set up virtual hosting on jspserver.website.com and
verityserver.website.com and then hand it urls like
http://chinese.website.com/search97/verityurl
http://chinese.website.com/dynamicpage.jsp
http://english.website.com/search97/verityurl
http://english.website.com/dynamicpage.jsp
and have the 1st and 3rd requests go to the same computer but get different
branding and languages
Likewise, the 2nd and 4th requests would go the same computer.
>that way internally you could access the "proxied" webserver directly with
a browser, without
>having to resort to tricks.
I'm don't totally understand what you are talking about. I'm not looking to
set, change or do any work with any headers or do any virtual hosting on
the webserver where I want to make this change. I'm only looking to NOT
replace the original host header, aka to pass the Host header through the
proxy, aka to make the proxy more transparent. I think that both replacing
that not replacing the original host header in reverse proxying have there
uses, but the current (1.3.22) code only supports replacing the host header