On Wed, Oct 26, 2011 at 01:11:40AM +0400, Кирюшкин Владимир wrote:
/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.
echo "Content-type: text/html; charset=UTF-8";
echo "i am cgi script<br><br>";
echo "env: <br><br>";
What are HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR in the output of this
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,
Francis Daly fran...@daoine.org
nginx mailing list