| From | Sent On | Attachments |
|---|---|---|
| Кирюшкин Владимир | Oct 25, 2011 2:10 pm | |
| Francis Daly | Oct 25, 2011 3:09 pm | |
| Кирюшкин Владимир | Oct 25, 2011 3:16 pm | |
| Aleksandar Lazic | Oct 25, 2011 3:39 pm | |
| Francis Daly | Oct 26, 2011 6:02 am | |
| Igor Sysoev | Oct 26, 2011 7:26 am | |
| Кирюшкин Владимир | Oct 26, 2011 7:32 am | |
| Кирюшкин Владимир | Oct 26, 2011 8:48 am | |
| Aleksandar Lazic | Oct 26, 2011 8:50 am | |
| Кирюшкин Владимир | Oct 26, 2011 1:37 pm | |
| Aleksandar Lazic | Oct 26, 2011 2:01 pm |
| Subject: | Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1 | |
|---|---|---|
| From: | Francis Daly (fran...@daoine.org) | |
| Date: | Oct 25, 2011 3:09:32 pm | |
| List: | ru.sysoev.nginx | |
On Wed, Oct 26, 2011 at 01:11:40AM +0400, Кирюшкин Владимир wrote:
Hi there,
/etc/nginx/proxy.conf has such options among others:
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
That should cause two variables HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR to be visible in the CGI output.
and I have patched latest thttpd
(http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz) with this patch:
http://wiki.nginx.org/ThttpdRealIP
That patch looks like it will write the value of the X-Forwarded-For header into something internal to thttpd.
#!/bin/sh echo "Content-type: text/html; charset=UTF-8"; echo; echo "i am cgi script<br><br>"; echo "env: <br><br>"; env
What are HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR in the output of this cgi script?
If they are not what you expect, check what nginx is doing.
If they are what you expect, check what your patched thttpd is doing.
Good luck with it,
f
-- Francis Daly fran...@daoine.org
_______________________________________________ nginx mailing list ngi...@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx





