How to retrieve HTTP header from Apache in nginx?

Igor Sysoev is at rambler-co.ru
Wed Sep 10 09:13:55 MSD 2008


On Tue, Sep 09, 2008 at 01:53:04PM -0700, Alex Man wrote:

> I have the following setup:
> 
> Apache -> Squid -> nginx -> Zope
> 
> Zope needs a header that is set by Apache in httpd.conf like the following:
> 
> RequestHeader set USER %{VALUE}
> 
> My question is, how can I ask nginx to pass on this header to Zope? 
> I'm sure nginx is the problem because if I take nginx out of the chain:
> 
> Apache -> Squid -> Zope
> 
> Zope can immediately see the header.
> 
> I tried using the proxy_set_header directive like the following in 
> nginx.conf
> 
> proxy_set_header USER $USER
> 
> but it doesn't seem to work.

You should do nothing on nginx side: it will pass the header to Zope by
default.

BTW, I think that nginx is unneccessary in this chain:

 Apache -> Squid -> nginx -> Zope

and probably

 Squid -> Apache -> Zope

is more logical chain.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list