nginx and thttpd + cgi, remote_addr = 127.0.0.1
vk at jasystem.net
Tue Oct 25 22:17:37 UTC 2011
thanks for your answer.
26.10.2011, 02:10, "Francis Daly" <francis at daoine.org>:
> On Wed, Oct 26, 2011 at 01:11:40AM +0400, Кирюшкин Владимир wrote:
> That should cause two variables HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR
> to be visible in the CGI output.
alas, no. the full output is (when using proxy):
i am cgi script<br><br>
HTTP_USER_AGENT=Opera/9.80 (X11; Linux i686; U; ru) Presto/2.9.168 Version/11.51
HTTP_ACCEPT=text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
> That patch looks like it will write the value of the X-Forwarded-For
> header into something internal to thttpd.
yes, it is intended to change X-Forwarded-For into Remote-Addr, but seems that it doesn't work.
> What are HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR in the output of this
> cgi script?
there are no such vars at all.
> If they are not what you expect, check what nginx is doing.
how could i do that?
More information about the nginx