# Simple forward proxy

**URL:** <https://www.ruby-forum.com/t/simple-forward-proxy/228557>\
**Category:** NGINX\
**Created:** [April 27, 2013, 10:19am UTC](https://www.ruby-forum.com/t/simple-forward-proxy/228557 "2013-04-27T10:19:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asmith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@asmith](https://www.ruby-forum.com/u/asmith)\
**Post date:** [April 27, 2013, 10:19am UTC](https://www.ruby-forum.com/t/simple-forward-proxy/228557/1 "2013-04-27T10:19:29Z")

</div>

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:

> **[Simple forward proxy](https://forum.nginx.org/read.php?2,238675,238675#msg-238675)**
>
> 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 {

---

<div class="post-metadata">

**Author:** ![asmith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@asmith](https://www.ruby-forum.com/u/asmith)\
**Post date:** [April 27, 2013, 11:19am UTC](https://www.ruby-forum.com/t/simple-forward-proxy/228557/2 "2013-04-27T11:19:40Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
