Http_proxy using HTTP/1.1?

Hello all,

Is it possible to have the proxy module communicate with back-end
servers using HTTP/1.1? The back-end servers that I am proxying, in this
case, require the Host header as part of the HTTP/1.1 protocol.

Thanks for any ideas you may have.

-Ian N.

Hey Ian,

I’m not sure but i think i might be having the same issue. I have a
swiftiply server as backend that requires host header to select the
right application to serve. It seems my backend server is not getting
these as I am alwasy served the default application no matter what i
write in the url…

If you find anything, let me know.

Pierre-olivier Poc wrote:

http://wiki.codemongers.com/NginxHttpProxyModule#proxy_set_header

Evan M. wrote:

http://wiki.codemongers.com/NginxHttpProxyModule#proxy_set_header

This didn’t seem to work for me. It’s still sending “HTTP/1.0” in the
request and that seems to kill the connection to the virtual server on
Apache.

Found my problem. I was sending the wrong host (duh). Setting the header
host with $host would send to my swiftiply server the host
blabla.mynginxserver.com” which is not recognized and so returns the
default application.

On Tuesday 12 February 2008 15:01:59 Ian N. wrote:

Evan M. wrote:

http://wiki.codemongers.com/NginxHttpProxyModule#proxy_set_header

This didn’t seem to work for me. It’s still sending “HTTP/1.0” in the
request and that seems to kill the connection to the virtual server on
Apache.

http://wiki.codemongers.com/NginxHttpProxyModule

I actually found my problem. Headers are being sent to the proxied
server that are interfering.

Is it possible to tell nginx to not send certain headers to the proxied
servers?

Thanks.

-Ian

If its absolutely essential for you to have HTTP 1.1 behaviour between
proxy and upstream then give lighttpd 1.5 (out of svn) a try

svn checkout svn://svn.lighttpd.net/lighttpd/trunk/

http://trac.lighttpd.net/trac/wiki/Docs%3AModProxyCore

On Wednesday 13 February 2008, Ian N. wrote:

Is it possible to tell nginx to not send certain headers to the proxied
servers?

just set an empty string as header and nginx won’t send it to back-end.
for example:

proxy_set_header Accept-Encoding “”;

Ian N. wrote:

I actually found my problem. Headers are being sent to the proxied
server that are interfering.

Is it possible to tell nginx to not send certain headers to the proxied
servers?

Thanks.

-Ian

That was easy.

To stop a header from being sent to the proxied servers just set the
header to blank!

For example:
proxy_set_header Authorization “”;
proxy_set_header User-Agent “”;

HTH someone else.

-Ian