如果网站出现了如下报错: “400 Bad Request: The plain HTTP request was sent to HTTPS port”, 那么原因多半是因为在做http重定向到https的配置里将 ssl 设置了为 on , 解决办法就是将该属性设置为 off 或者注释掉该属性就可以了.

参考资料 : https://www.centos.bz/2018/01/nginx%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3the-plain-http-request-was-sent-to-https-port%E9%94%99%E8%AF%AF/