Using HTTP 1.1 with the backend server

Björn Keil abgrund at silberdrache.net
Tue Jun 3 19:00:39 MSD 2008


Am Dienstag, den 03.06.2008, 16:52 +0200 schrieb Björn Keil:
> Am Dienstag, den 03.06.2008, 20:52 +0700 schrieb Denis F. Latypoff:
> > Hello Björn,
> > 
> > Tuesday, June 3, 2008, 8:38:09 PM, you wrote:
> > 
> > > Hello,
> > 
> > > I am having problems with a setup of nginx as Reverse Proxy / Load
> > > Balancer / SSL Wrapper for a couple of Apache webservers.
> > 
> > > The originally requested hostname gets lost due to the use of HTTP 1.0
> > > instead of HTTP 1.1 on the conversation with the backend server. Thus,
> > > the server assumes "ServerName" (in the Apache config), even though one
> > > of the Aliases would be correct.
> > 
> > > I could probably avoid the problem if I added an additianal header with
> > > the requested hostname, but I would prefer passing the original HTTP 1.1
> > > request as is to the backend server. Is that somehow makeable?
> > 
> > proxy_set_header Host $host
> 
> Yeah, I found that a second after I send this mail myself... it's even
> given as example in the doku. However. While the Apache PHP module
> understands this, the Apache itsself does not. It always uses the first
> configured Virtual Host even if another was requested.
> 
> I cannot use name based virtual hosts in Apache if the protocol isn't
> HTTP/1.1, it seems. Even if there's a host header it's being ignored in
> HTTP/1.0 - which is technically the best solution, because it's a
> violation of the HTTP/1.0 protocol.
> 
> So... is there any way at all to make nginx talk HTTP/1.1 to the backend
> server, or do I really have to set up IP based virtual hosts and
> seriously bloat up both nginx's and Apache's config? I don't understand
> why it would use a different protocol than the original request at all
> in first place - why not pass the request as it was made?

Forget above message.
The problem with just me being to dumb to write a correct Alias
definition in Apache. Now it works without much fiddling, HTTP/1.0 or
no.






More information about the nginx mailing list