How does Nginx pass SSL encrypted data to a Rails application?

Suppose I have an installation running my Rails application with Unicorn and using Nginx as a reverse proxy. When Nginx is configured to handle SSL, does it mean that it transfers the encrypted data directly to my Rails application without changes or decrypts it and then sends it to my Rails application so that the Rails application sees unencrypted data?

+1
ruby-on-rails ssl nginx
Mar 28 '13 at 2:40
source share
1 answer

This is called nginx ssl term. The data is already decrypted by nginx, and the upstream rails application just needs to process unencrypted data, i.e. The rails application just needs to listen on port 80 (http) and in setting up the reverse proxy, you should have

proxy_pass http://rails_app_domain; 

NOT

 proxy_pass https://rails_app_domain; 
+3
Mar 28 '13 at 3:05
source share



All Articles