Nginx can not forward the request protocol correctly to upstream

前端 未结 2 949
眼角桃花
眼角桃花 2020-12-09 11:03

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

2条回答
  •  借酒劲吻你
    2020-12-09 11:42

    You will need to configure two separate server blocks. One for HTTP and one for HTTPS. It will make configuring the two a whole lot easier. Parts that are identical you can include from a separate shared config file.

提交回复
热议问题