Nginx as a forward proxy?

Joel Wood lists at
Fri Oct 24 22:46:40 MSD 2008

Hey Folks,

I was wondering if it would be possible to use nginx as a forward proxy.
I'm currently using tinyproxy on a project but it seems to have some
issues leaking connections, so I'm looking for alternatives.  Since I've
used nginx for other projects, I thought I would muck around with it.

So I have a basic, naive config that doesn't work.

        location / {
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded_for $proxy_add_x_forwarded_for;
         proxy_set_header Host $http_host;
         proxy_redirect false;
         proxy_max_temp_file_size 0;

         proxy_pass http://$host$uri;

Before I fire up the packet sniffer, is what I'm trying to do even
possible with nginx?

Posted via

More information about the nginx mailing list