You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jie Gao <J....@sydney.edu.au> on 2012/04/10 02:38:54 UTC
Scope of ProxyPreserveHost (was: Re: [users@httpd] SNI with apache
2.4.1 reverse proxy)
Hi All
Would it be possible to expand the scope of ProxyPreserveHost to "Location"?
Regards,
Jie
* Igor Gali?? <i....@brainsware.org> wrote:
> Date: Mon, 9 Apr 2012 08:56:12 +0000
> From: Igor Gali?? <i....@brainsware.org>
> To: dev@httpd.apache.org
> CC: Michael Weiser <mi...@dinsnail.net>
> Subject: Re: [users@httpd] SNI with apache 2.4.1 reverse proxy
> X-Mailer: Zimbra 7.0.0_GA_3077 (ZimbraWebClient - FF3.0
> (Linux)/7.0.0_GA_3077)
>
>
>
> ----- Original Message -----
> > On 07.04.2012 00:34, Daniel Ruggeri wrote:
> > > I wanted to bring this up here - seems like a few things are going
> > > on
> > > that are confusing to me. I'll try to look into it when time
> > > becomes
> > > available, but I thought someone might have an opinion off the bat.
> > >
> > > -------- Original Message --------
> > > Subject: [users@httpd] SNI with apache 2.4.1 reverse proxy
> > > Date: Fri, 6 Apr 2012 14:11:50 +0200
> > > From: Michael Weiser <mi...@dinsnail.net>
> > > Reply-To: users@httpd.apache.org
> > > To: users@httpd.apache.org
> >
> > [...]
> >
> > > [Fri Apr 06 11:23:55 2012] [error] Hostname www.example.com
> > > provided
> > > via SNI and hostname subdomain.example.com provided via HTTP are
> > > different
> >
> > Seems like mod_ssl is not getting the "proper" host name in the
> > "proxy-request-hostname" note... from a quick glance at the "working
> > HTTPS reverse proxy configuration of httpd 2.2", he is obviously
> > trying
> > to forward the whole domain to port 12443 on the same machine (note
> > the "*.example.com" ServerAlias):
> >
> > > <VirtualHost *:443>
> > > DocumentRoot /var/www/www.example.com
> > >
> > > ServerName www.example.com
> > > ServerAlias example.com *.example.com
> > [...]
> > > ProxyPass / https://www.example.com:12443/
> > > ProxyPassReverse / https://www.example.com:12443/
> >
> > Then it looks like mod_proxy_http determines the value for
> > "proxy-request-hostname" from the remote URL in ProxyPass, but is
> > passing on the Host header from the original request.
>
> That would imply ProxyPreserveHost on -- which is off by default
> I also don't see it in Micha's paste.
>
> > Kaspar
>
> i
>
> --
> Igor Gali??
>
> Tel: +43 (0) 664 886 22 883
> Mail: i.galic@brainsware.org
> URL: http://brainsware.org/
> GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
>
Re: Scope of ProxyPreserveHost
Posted by Jie Gao <J....@sydney.edu.au>.
Thanks, Kaspar, for the info. That's exactly what I had in mind.
And thanks for this new great feature in 2.3/4!
Jie
* Kaspar Brand <ht...@velox.ch> wrote:
> Date: Tue, 10 Apr 2012 18:38:02 +0200
> From: Kaspar Brand <ht...@velox.ch>
> To: dev@httpd.apache.org
> Subject: Re: Scope of ProxyPreserveHost
>
> On 10.04.2012 12:38, Tom Evans wrote:
> > On Tue, Apr 10, 2012 at 1:38 AM, Jie Gao <J....@sydney.edu.au> wrote:
> >> Hi All
> >>
> >> Would it be possible to expand the scope of ProxyPreserveHost to "Location"?
> >>
> >> Regards,
> >>
> >>
> >> Jie
> >>
> >
> > I don't understand; ProxyPreserveHost affects the proxying apache
> > server, and controls whether it rewrites the 'Host' header in the
> > request with the selected backend's hostname or not.
> >
> > 'Location' on the other hand is a response header. mod_proxy already
> > has a directive to rewrite response headers like 'Location', see
> > ProxyPassReverse.
>
> s/"Location"/<Location>/, presumably.
>
> Per-dir support for ProxyPreserveHost was added in 2.3.3, actually:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=34901.
>
> Kaspar
Re: Scope of ProxyPreserveHost
Posted by Kaspar Brand <ht...@velox.ch>.
On 10.04.2012 12:38, Tom Evans wrote:
> On Tue, Apr 10, 2012 at 1:38 AM, Jie Gao <J....@sydney.edu.au> wrote:
>> Hi All
>>
>> Would it be possible to expand the scope of ProxyPreserveHost to "Location"?
>>
>> Regards,
>>
>>
>> Jie
>>
>
> I don't understand; ProxyPreserveHost affects the proxying apache
> server, and controls whether it rewrites the 'Host' header in the
> request with the selected backend's hostname or not.
>
> 'Location' on the other hand is a response header. mod_proxy already
> has a directive to rewrite response headers like 'Location', see
> ProxyPassReverse.
s/"Location"/<Location>/, presumably.
Per-dir support for ProxyPreserveHost was added in 2.3.3, actually:
https://issues.apache.org/bugzilla/show_bug.cgi?id=34901.
Kaspar
Re: Scope of ProxyPreserveHost (was: Re: [users@httpd] SNI with
apache 2.4.1 reverse proxy)
Posted by Tom Evans <te...@googlemail.com>.
On Tue, Apr 10, 2012 at 1:38 AM, Jie Gao <J....@sydney.edu.au> wrote:
> Hi All
>
> Would it be possible to expand the scope of ProxyPreserveHost to "Location"?
>
> Regards,
>
>
> Jie
>
I don't understand; ProxyPreserveHost affects the proxying apache
server, and controls whether it rewrites the 'Host' header in the
request with the selected backend's hostname or not.
'Location' on the other hand is a response header. mod_proxy already
has a directive to rewrite response headers like 'Location', see
ProxyPassReverse.
Cheers
Tom