atom feed11 messages in ru.sysoev.nginxRe: nginx and thttpd + cgi, remote_ad...
FromSent OnAttachments
Кирюшкин ВладимирOct 25, 2011 2:10 pm 
Francis DalyOct 25, 2011 3:09 pm 
Кирюшкин ВладимирOct 25, 2011 3:16 pm 
Aleksandar LazicOct 25, 2011 3:39 pm 
Francis DalyOct 26, 2011 6:02 am 
Igor SysoevOct 26, 2011 7:26 am 
Кирюшкин ВладимирOct 26, 2011 7:32 am 
Кирюшкин ВладимирOct 26, 2011 8:48 am 
Aleksandar LazicOct 26, 2011 8:50 am 
Кирюшкин ВладимирOct 26, 2011 1:37 pm 
Aleksandar LazicOct 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.

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