Nginx as a forward proxy?

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?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs