突然收到 SSL 握手错误

突然收到 SSL 握手错误

我有一个网站https://www.sqeazy.com在运行 nginx 网络服务器并使用 Letsencrypy certbot SSL 的 Ubuntu 18.04.1 AWS Lightsail VM 上。该网站运行正常,但当我今天检查它时,客户端浏览器返回了 ERR_TOO_MANY_REDIRECTS,并且 nginx 错误日志显示

[crit] 2707#2707: *768 SSL_do_handshake() failed (SSL: error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol) while SSL handshaking, 

Certbot 证书仍然有效。我已使用多种设备和浏览器进行了测试,但出现了相同/类似的错误。

我一直在谷歌搜索,但找不到合理的解释。有一件事是,我的设备昨天已更新为 GMT(从 BST 更新) - 但这并没有影响以相同方式配置的其他服务器/网站。

任何帮助均感激不尽。

nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

nginx /sites-enabled/sqeazy.conf

# the upstream component nginx needs to connect to

upstream django {

    server unix:///home/ubuntu/sqeazy/sqeazy.sock;

}



# configuration of the server

server {

    server_name sqeazy.com www.sqeazy.com;

    charset     utf-8;



    # max upload size

    client_max_body_size 75M;



    # Django media and static files

    location /media  {

        alias /home/ubuntu/sqeazy/media;

    }

    location /static {

        alias /home/ubuntu/sqeazy/static;

    }



    # Send all non-media requests to the Django server.

    location / {

        uwsgi_pass  django;

        include     /home/ubuntu/sqeazy/uwsgi_params;

    }


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/sqeazy.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/sqeazy.com/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 = www.sqeazy.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    if ($host = sqeazy.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen      80;
    server_name sqeazy.com www.sqeazy.com;
    return 404; # managed by Certbot
}

答案1

我已经追踪到问题所在。我们的请求量异常高,我们向 ipstack.com 发出的用户位置请求超出了限制,导致网站后端出现错误。

因此看起来这个 SSL 握手错误可能是由于服务器无响应造成的。

相关内容