Welcome! Log In Create A New Profile

Advanced

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир
October 25, 2011 06:18PM
Hello,

thanks for your answer.

26.10.2011, 02:10, "Francis Daly" <francis@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>
env: <br><br>
GATEWAY_INTERFACE=CGI/1.1
REMOTE_ADDR=127.0.0.1
HTTP_USER_AGENT=Opera/9.80 (X11; Linux i686; U; ru) Presto/2.9.168 Version/11.51
CGI_PATTERN=**.cgi|**.pl
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
HTTP_HOST=***hidden***
SERVER_SOFTWARE=thttpd/2.25b 29dec2003
PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin
HTTP_ACCEPT_LANGUAGE=ru, en
SERVER_PROTOCOL=HTTP/1.0
REQUEST_METHOD=GET
PWD=/var/www/default
SERVER_PORT=8000
SCRIPT_NAME=/index.cgi
SERVER_NAME=127.0.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?


Cheers,

Vladimir

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир October 25, 2011 05:12PM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Francis Daly October 25, 2011 06:12PM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир October 25, 2011 06:18PM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Aleksandar Lazic October 25, 2011 06:42PM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Francis Daly October 26, 2011 09:04AM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир October 26, 2011 10:34AM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Igor Sysoev October 26, 2011 10:28AM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир October 26, 2011 11:50AM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Aleksandar Lazic October 26, 2011 11:52AM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Кирюшкин Владимир October 26, 2011 04:38PM

Re: nginx and thttpd + cgi, remote_addr = 127.0.0.1

Aleksandar Lazic October 26, 2011 05:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready