Nginx:The plain HTTP request was sent to HTTPS port解决办法
2016-09-22 17:16
459 查看
情况说明nginx 代理https后,应用redirect https变成http情况类似http://2hei.net/mt/2010/02/request-getscheme-cannt-get-https.htmlhttp://yywudi.info/nginx-https-400-bad-request-solution/原因分析:浏览器到nginx是https,nginx到应用服务器变成http,应用服务器,再做302 redirect的时候,返回的redirect 地址就变成了http的地址;原因是spring mvc的servlet的secheme取值,request.getScheme()是取请求里的一个scheme值,所有这个值在nginx代理时要设置成https其中: request.getScheme() return http but not https.解决方法:目前是
参考:http://serverfault.com/questions/372886/prevent-nginx-from-redirecting-traffic-from-https-to-http-when-used-as-a-reverse
转载自:https://my.oschina.net/greki/blog/168089
proxy_redirect http:// $scheme://;具体说明,还没仔细调查,有时间在细致研究下
参考:http://serverfault.com/questions/372886/prevent-nginx-from-redirecting-traffic-from-https-to-http-when-used-as-a-reverse
转载自:https://my.oschina.net/greki/blog/168089
相关文章推荐
- Nginx出现The plain HTTP request was sent to HTTPS port问题解决方法
- nginx: 400 Bad Request | The plain HTTP request was sent to HTTPS port
- nginx: 400 Bad Request | The plain HTTP request was sent to HTTPS port
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法 .
- springMVC日期转换及The request sent by the client was syntactically incorrect.解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- springMVC日期转换及The request sent by the client was syntactically incorrect.解决办法
- 两种解决异常:“The last packet sent successfully to the server was 0 milliseconds ago. ”的办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect "解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- Spring MVC "The request sent by the client was syntactically incorrect "解决办法
- The request sent by the client was syntactically incorrect解决办法
- The last packet successfully received from the server was 2,926,157 milliseconds ago. The last packet sent successfully to the server was 2,926,158 milliseconds ago. is longer than the server configured value of 'wait_timeout'. 解决办法
- The request sent by the client was syntactically incorrect (). 的某个解决办法
- The last packet sent successfully to the server was 0 milliseconds ago. 的解决办法
- Spring MVC "The request sent by the client was syntactically incorrect ()"解决办法
- 解决 spring mvc3.1下post json出现HTTP Status 400 The request sent by the client was syntactically incorrect