# Nginx Reverse Proxy - HTTPsupport?

**URL:** <https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561>\
**Category:** NGINX\
**Created:** [September 7, 2010, 7:12am UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561 "2010-09-07T07:12:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlangevin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@jlangevin](https://www.ruby-forum.com/u/jlangevin)\
**Post date:** [September 7, 2010, 7:12am UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561/1 "2010-09-07T07:12:46Z")

</div>

I’ve successfully configured Nginx on an Ubuntu 10.04 box, serving up a  
dynamic PHP website.  
We need to be able to reverse proxy this website, which I’ve also been  
able to do, as:

www frontend (nginx reverse proxy)  
www1 backend (nginx php webserver)

The intention is to be able to add/remove backend servers at will.

The only issue I have so far, is that the frontend, as configured, does  
not proxy SSL requests.  
How can I enable this on my configuration?  
Please note, the backend server _does_ have functioning SSL config, and  
was tested directly to verify both :80 and :443 work as intended.

Thanks!

Posted at Nginx Forum:

> **[nginx Reverse Proxy - HTTP\[S\] support?](https://forum.nginx.org/read.php?2,127852,127852#msg-127852)**
>
> I've successfully configured Nginx on an Ubuntu 10.04 box, serving up a dynamic PHP website. We need to be able to reverse proxy this website, which I've also been able to do, as: www frontend (nginx reverse proxy) www1 backend (nginx php webserver)...

---

<div class="post-metadata">

**Author:** ![jlangevin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@jlangevin](https://www.ruby-forum.com/u/jlangevin)\
**Post date:** [September 7, 2010, 8:41am UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561/2 "2010-09-07T08:41:45Z")

</div>

On Tue, Sep 07, 2010 at 01:11:22AM -0400, jlangevin wrote:

> The only issue I have so far, is that the frontend, as configured, does  
> not proxy SSL requests.  
> How can I enable this on my configuration?

> **[Configuring HTTPS servers](http://nginx.org/en/docs/http/configuring_https_servers.html)**

> Please note, the backend server _does_ have functioning SSL config, and  
> was tested directly to verify both :80 and :443 work as intended.

You may proxy to SSL:

location / {  
proxy\_pass [https://backend](https://backend);  
}

however, it’s better to leave SSL only on nginx side and proxy SSL to  
plain HTTP:

server {  
listen 443;  
ssl on;  
# other ssl stuff

```
location / {
    proxy_pass http://backend;
}

```

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![jlangevin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@jlangevin](https://www.ruby-forum.com/u/jlangevin)\
**Post date:** [September 7, 2010, 1:39pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561/3 "2010-09-07T13:39:14Z")

</div>

Thanks for your reply Igor!

So I should remove SSL from the backend box, and add to the reverse  
proxy?  
That’s what I was thinking, but I wasn’t sure if I still needed it on  
the backend as well 🙂

Thanks for your response, you’ve been a great help!

Posted at Nginx Forum:

> **[Re: nginx Reverse Proxy - HTTP\[S\] support?](https://forum.nginx.org/read.php?2,127852,127914#msg-127914)**
>
> I've successfully configured Nginx on an Ubuntu 10.04 box, serving up a dynamic PHP website. We need to be able to reverse proxy this website, which I've also been able to do, as: www frontend (nginx reverse proxy) www1 backend (nginx php webserver)...

---

<div class="post-metadata">

**Author:** ![jlangevin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8e8cbc/32.png) [@jlangevin](https://www.ruby-forum.com/u/jlangevin)\
**Post date:** [September 7, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-httpsupport/194561/4 "2010-09-07T13:43:55Z")

</div>

On Tue, Sep 07, 2010 at 07:38:05AM -0400, jlangevin wrote:

> Thanks for your reply Igor!
> 
> So I should remove SSL from the backend box, and add to the reverse  
> proxy?  
> That’s what I was thinking, but I wasn’t sure if I still needed it on  
> the backend as well 🙂

Yes, you do not need SSL on the backend.

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
