How to retrieve HTTP header from Apache in nginx?

Alex Man alexman at seas.ucla.edu
Tue Sep 16 22:49:43 MSD 2008


Hi Aleks,

Thanks for your information.

My problem is that, as I described in my first email, a header is not 
passed by nginx to the ZEO clients for some reason. Igor said that it 
should pass the header to Zope by default but I think it's not doing 
that since as soon as I take nginx out of the chain, Plone can see the header.

For your reference, the following is my first email with some more details:

I have the following setup

Apache -> Squid -> nginx -> ZEO clients -> ZEO server (Plone)

Plone needs a header for authentication 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 -> ZEO clients -> ZEO server (Plone)

Plone can immediately recognize the user (so I assume it sees 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.

Any help is appreciated. Thanks a lot!

At 11:11 AM 9/13/2008, Aleksandar Lazic wrote:
>Hi Alex,
>
>On Fre 12.09.2008 11:16, Alex Man wrote:
>>Hi Aleks,
>>
>>Thanks for your response.
>>
>>The reason I'm using nginx instead of other load balancers such as
>>HAProxy and Pound is that they don't support (I believe) the fair
>>balancing algorithm provided by the Fair Proxy Balancer
>>(http://wiki.codemongers.com/NginxHttpUpstreamFairModule) module of
>>nginx. I would like the load balancer to send request to the
>>least-busy ZEO client.
>
>ok.
>
>haproxy can at the moment only:
>
>roundrobin, leastconn, source IP address, uri, url_param and appsession
>balancing
>
>the least-busy is pland but a eta is not available.
>
>>I'm using Apache because I'm also using
>><http://shibboleth.internet2.edu/>Shibboleth for authentication and I
>>believe the Shibboleth module can only be loaded in Apache.
>>
>>So, should I still be using nginx for the reason I listed above?
>>Thanks a lot!
>
>I think yes.
>
>BR
>
>Aleks

Regards,

Alex 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080916/524d3a2e/attachment.html>


More information about the nginx mailing list