Forward IP address to proxied server

Daniel Mircea lists at
Thu Oct 16 04:02:34 MSD 2008

Hi everyone,

I'm using nginx as a reverse proxy for a thttpd server that handles cgi
Everything works ok, except that the server doesn't seem to receive any
visitor info, every IP is interpreted as

This is the config, that I'm using to forward requests:

location ~ \.cgi$ {
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Host $http_host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# nginx -V
nginx version: nginx/0.6.31
built by gcc 4.1.2 20070626 (Red Hat 4.1.2-14)
configure arguments: --prefix=/opt/local/nginx
--sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access.log --pid-path=/var/run/
--lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx
--with-http_ssl_module --with-http_flv_module --with-http_dav_module
Posted via

More information about the nginx mailing list