解决 no ssl_certificate” is defined in server listening on SSL port while SSL handshaking

疑难杂症   no ssl_certificate  

场景

  • nginx 访问https 连接丢失
  • 443端口测试异常断开
  • 日志中提示no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:443

解决方案

  • nginx ssl 配置添加 default_server
listen 443 default_server ssl;  
例子:
server {

#Some configuration

listen 443 default_server ssl;

#Some configuration

}
  • 具体产生原因不明,有可能系统某些依赖被升级,出现之前是可以正常访问的