https://my.oschina.net/duxuefeng/blog/275179
Just found this article, two years ago, I think I need to point out that the text end of Nginx does not support HTTPS proxy is wrong.
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/8A/FA/wKiom1g_8kPDCfqFAAAX5GHr6qo480.jpg "title=" 1.jpg " alt= "Wkiom1g_8kpdcfqfaaax5ghr6qo480.jpg"/>
Here's the mistake, if you change to $http_host. As follows:
Proxy_pass $scheme://$http _host$request_uri;
The difference between $host and $http_host, can be found on the internet everywhere, it is not exhausted. The reason for the 400 error is that because of this, people are asking https://you to write a hard http, can you? For example, Agent Baidu, http://www.baidu.com:443, the log to ensure that 400 errors are written, this is the wrong correspondence, 443 is to HTTPS protocol, with the HTTP on a bad request Bai.
Rumor Nginx can't do https forward proxy?