Nginx can not forward the request protocol correctly to upstream
问题 I have a website in rails 4 beta. It is running on Nginx + Unicorn. I want nginx to forward the request protocol ( 'http' or 'https' ) to unicorn so that I can work with them. However I am not able to make it work. I put <%= request.ssl? %> and <%= request.protocol %> in the view file for testing. My nginx server config file is as following: upstream unicorn { server unix:/tmp/unicorn.blog.sock fail_timeout=0; } server { listen 80; listen 443; server_name example.com; root /home/example; ssl