Simple forward proxy

Hello,

I have nginx 1.3 on my ubuntu 10.04 and there are some websites running
by
it. I’d like to setup a forward proxy on a specific port so that I could
use
it on my browsers network options.

I’ve done this so far:

    server
    {
            listen my.vps.ip.address:54321;

            location /
            {
                    resolver 8.8.8.8;
                    proxy_pass 

$scheme://$http_host$uri$is_args$args;
}

            error_page   500 502 503 504  /50x.html;
            location = /50x.html
            {
                    root   html;
            }
    }

It works fine for http websites. but for all https websites, I get
“connection was reset”.
Any tweak for this?

Posted at Nginx Forum:

On Sat, Apr 27, 2013 at 04:19:05AM -0400, asmith wrote:

Hi there,

I have nginx 1.3 on my ubuntu 10.04 and there are some websites running by
it. I’d like to setup a forward proxy on a specific port so that I could use
it on my browsers network options.

nginx is not a forward proxy.

It does do some of the same things that a forward http proxy does, so if
you have a controlled environment and are interested in experimenting
to see which parts of “being a http proxy” the current nginx code does
reliably, then your design choices and patches to make nginx become a
http proxy might be interesting if they don’t affect its primary
purpose.

But nginx does not handle the http CONNECT method, which is usually the
way clients expect proxying of https to be done.

I’ve done this so far:

It works fine for http websites. but for all https websites, I get
“connection was reset”.

Logs should show you more details, if you care. But unless you’re
planning
on writing code to use yourself, you don’t need to care.

Any tweak for this?

Use a proxy server, not nginx.

f

Francis D. [email protected]