I'm trying to configure HTTPS for nginx on Ubuntu 16.04. I've already set it up with
listen 443 ssl statements, and told it where to find the certificate and private key files. After that I restarted the server with
sudo service nginx restart.
Now when I
curl https://my_ip_address, I get the following message:
curl: (35) gnutls_handshake() failed: Handshake failed
I've checked the two log files I know about,
/var/log/nginx/error.log; but it doesn't show any trace of anything from the request.
My question: Does anything get logged when the SSL handshake fails? If so where? In general, how to I troubleshoot problems like this, where there is an error in the SSL protocol before the HTTP request is sent to, or extracted by the server?
EDIT: I got it to work by removing the following lines from my config:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; ssl_ecdh_curve secp384r1; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; ssl_stapling on; ssl_stapling_verify on; resolver 184.108.40.206 220.127.116.11 valid=300s; resolver_timeout 5s;
ssl_ecdh_curve secp384r1; line seemed to be causing the problem. Without it, everything works fine, but with it, the SSL handshake fails. Curiously, the error message is that there is "no shared cipher". I'm not sure what it does, so I just removed it. I also removed the ssl_stapling stuff because I don't know what it is for, and it was creating its own error messages