首页 > Web开发 > 详细

nginx:400 Bad RequestThe plain HTTP request

时间:2018-03-14 00:22:05      阅读:1388      评论:0      收藏:0      [点我收藏+]
nginx: 400 Bad Request | The plain HTTP request was sent to HTTPS port

nginx 版本nginx/1.12.2
在nginx环境下使用ssl链接出现问题400错误
nginx配置文件如下:
技术分享图片

访问https时候正常,不过直接访问的时候会出现以下错误:
400 Bad Request The plain HTTP request was sent to HTTPS port错误

技术分享图片

技术分享图片

参考官方文档解决方法如下:
删掉ssl on; 并在 listen 443; 443后加上ssl即可

技术分享图片

http直接访问演示正常:
技术分享图片

到此解决

nginx:400 Bad RequestThe plain HTTP request

原文:http://blog.51cto.com/wujianwei/2086287

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!