nginx and thttpd + cgi, remote_addr = 127.0.0.1
Кирюшкин Владимир
vk at jasystem.net
Wed Oct 26 14:33:15 UTC 2011
Hello,
26.10.2011, 17:02, "Francis Daly" <francis at daoine.org>:
> Test the thttpd side:
>
> curl -H 'X-Forwarded-For: 127.0.0.2' http://[thttpd-server]/env.cgi
>
> If you don't see REMOTE_ADDR=127.0.0.2, then your thttpd is not acting
> as you expect. Nothing nginx can do can help you in that case.
localhost> curl -H 'X-Forwarded-For: 127.0.0.2' http://***myserver***:8000/index.cgi | grep -i remote
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 471 0 471 0 0 3007 0 --:--:-- --:--:-- --:--:-- 5962
REMOTE_ADDR=***myrealip***
myserver# grep -i x-forward /ramdisk/nginx_debug.log
2011/10/26 17:20:08 [debug] 11877#0: *3 http header: "X-Forwarded-For: 127.0.0.2"
well, seems that it's thttpd issue.
26.10.2011, 18:26, "Igor Sysoev" <igor at sysoev.ru>:
> You may want to use mini_httpd instead of thttpd.
> There is patch to support "X-Real-IP" header in mini_httpd:
> http://mailman.nginx.org/pipermail/nginx/2010-October/023292.html
thanks, i'll follow your advice.
Cheers,
Vladimir
More information about the nginx
mailing list