How to retrieve HTTP header from Apache in nginx?
Alex Man
alexman at seas.ucla.edu
Wed Sep 10 22:24:47 MSD 2008
Hi Igor,
Thanks for your response.
Actually, I'm using nginx as a load balancer for a number of ZEO
clients and a ZEO server. So the more precise picture should be
Aapche -> Squid -> nginx -> ZEO clients -> ZEO server (Plone)
The reason that I'm using nginx as a load balancer is that is has
<http://wiki.codemongers.com/NginxHttpUpstreamFairModule>Fair Proxy
Balancer that Apache and Squid don't have.
Since I've tried taking nginx out of the chain and I see that Plone
recognize the header, there must be something about nginx that's
causing it. Do you have any idea on that? My nginx.conf is something like this
worker_processes 1;
events {
worker_connections 256;
}
http {
upstream zeo_clients {
server <ip_of_zeo_client1>;
server <ip_of_zeo_client2>;
....
fair;
}
server {
listen 3800;
server_name localhost;
location / {
proxy_pass http://zeo_clients;
}
}
}
Thanks a lot!
At 10:13 PM 9/9/2008, Igor Sysoev wrote:
>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/
Regards,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080910/e8455666/attachment.html>
More information about the nginx
mailing list