# Encrypting traffic between Nginx and App Server backend (via FastCGI)

**URL:** <https://www.ruby-forum.com/t/encrypting-traffic-between-nginx-and-app-server-backend-via-fastcgi/223740>\
**Category:** NGINX\
**Created:** [October 16, 2012, 10:59am UTC](https://www.ruby-forum.com/t/encrypting-traffic-between-nginx-and-app-server-backend-via-fastcgi/223740 "2012-10-16T10:59:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 16, 2012, 10:59am UTC](https://www.ruby-forum.com/t/encrypting-traffic-between-nginx-and-app-server-backend-via-fastcgi/223740/1 "2012-10-16T10:59:32Z")

</div>

I was wondering if it was possible to encrypt traffic between an Nginx  
front end and an app server back end? I have a Django application  
running and can have the traffic between the Django app and the database  
encrypted using SSL and can have traffic from the internet at large and  
Nginx encrypted also using SSL but I need to have the traffic between  
the Nginx server and the Django app server encrypted as well. Is there a  
method to accomplish this?

Thank you for any help.

---

<div class="post-metadata">

**Author:** ![newdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@newdude](https://www.ruby-forum.com/u/newdude)\
**Post date:** [October 16, 2012, 11:32am UTC](https://www.ruby-forum.com/t/encrypting-traffic-between-nginx-and-app-server-backend-via-fastcgi/223740/2 "2012-10-16T11:32:52Z")

</div>

On Tue, Oct 16, 2012 at 3:58 PM, Some D.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I was wondering if it was possible to encrypt traffic between an Nginx front  
> end and an app server back end? I have a Django application running and can  
> have the traffic between the Django app and the database encrypted using SSL  
> and can have traffic from the internet at large and Nginx encrypted also  
> using SSL but I need to have the traffic between the Nginx server and the  
> Django app server encrypted as well. Is there a method to accomplish this?

I know two methods

1. nginx on django end with ssl setup
2. stunnel or similar

---

<div class="post-metadata">

**Author:** ![newdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@newdude](https://www.ruby-forum.com/u/newdude)\
**Post date:** [October 16, 2012, 12:44pm UTC](https://www.ruby-forum.com/t/encrypting-traffic-between-nginx-and-app-server-backend-via-fastcgi/223740/3 "2012-10-16T12:44:46Z")

</div>

On 16/10/2012 10:31, Edho A. wrote:

> I know two methods
> 
> 1. nginx on django end with ssl setup
> 2. stunnel or similar

stunnel looks good. Thanks.
