400 Bad Request

The plain HTTP request was sent to HTTPS port

此报错实际是 HTTP 497状态码 在nginx中可利用状态码重定向到https

server {
  error_page  497  https://$host$uri?$args; 
...
}
server {
  error_page 497 /497.html;
  location = /497.html {
      return 301 https://$host;

  }
...