Rumor Nginx can't do https forward proxy?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.