Welcome! Log In Create A New Profile

Advanced

Re: Forward IP address to proxied server

September 07, 2009 04:38AM
Wanted to provide a solution to this thread since it still applies:

http://wiki.nginx.org/ThttpdRealIP

Cliff

On Wed, 2008-10-15 at 17:09 -0700, mike wrote:
> sounds like a thttpd config issue :p
>
> unless thttpd has a way to say that "x-forwarded-for" is the true ip,
> you're going to have to modify the app to use that IP etc
>
>
> On Wed, Oct 15, 2008 at 5:02 PM, Daniel Mircea <lists@ruby-forum.com> wrote:
> > Hi everyone,
> >
> > I'm using nginx as a reverse proxy for a thttpd server that handles cgi
> > scripts.
> > Everything works ok, except that the server doesn't seem to receive any
> > visitor info, every IP is interpreted as 127.0.0.1.
> >
> > 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;
> > proxy_pass http://127.0.0.1:30001;
> > }
> >
> > --
> > # 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
> > --error-log-path=/var/log/nginx/error.log
> > --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid
> > --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx
> > --with-http_ssl_module --with-http_flv_module --with-http_dav_module
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> >
>
--
http://www.google.com/search?q=vonage+sucks
Subject Author Posted

Re: Forward IP address to proxied server

Cliff Wells September 07, 2009 04:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
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