单个 nginx 配置失败导致站点无法访问

单个 nginx 配置失败导致站点无法访问

一个VPSsites-enabled目录下有多个文件。

其中一个在一段时间后出现故障。日志对我来说没有什么指示性,但这些行代表了一批错误:

2022/01/16 06:36:44 [crit] 738797#738797: *9702 SSL_do_handshake() failed (SSL: error:14201044:SSL routines:tls_choose_sigalg:internal error) while SSL handshaking, client: 17[obfusc], server: 0.0.0.0:443
2022/01/16 07:01:27 [crit] 738797#738797: *9716 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 14[obfusc], server: 0.0.0.0:443
2022/01/16 17:42:52 [info] 1309633#1309633: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:63

总体而言,nginx -t仅抱怨一行重复,但对于另一个域,并指示它忽略该行。
受影响应用程序的配置如下

server {

  server_name third.second.ws;
  root /home/deploy/examine/current/public;

  passenger_enabled on;
  passenger_app_env development;

  location /cable {
    passenger_app_group_name myapp_websocket;
    passenger_force_max_concurrent_requests_per_process 0;
  }

  # Allow uploads up to 100MB in size
  client_max_body_size 100m;

  location ~ ^/(assets|packs) {
    expires max;
    gzip_static on;
  }


    listen 443 ssl http2;

#    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/third.second.ws/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/third.second.ws/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = third.second.ws) {
        return 301 https://$host$request_uri;
    } # managed by Certbot



  server_name third.second.ws;
    listen 80;
    return 404; # managed by Certbot


}

上述什么可以解释该配置文件的失败?

相关内容