天蓬老师2017-04-27 09:03:22
You didn’t access it directly using the IP address? The certificate proves the domain name, and you must use the domain name bound to the certificate to access.
伊谢尔伦2017-04-27 09:03:22
The certificate is issued for the domain name. Of course, this will happen if you use IP to access it, because the certificate corresponding to the IP cannot be found!
黄舟2017-04-27 09:03:22
The path of the digital certificate should use an absolute path, for example:
ssl_certificate /usr/local/nginx/ssl/enginx.net.crt;
ssl_certificate_key /usr/local/nginx/ssl/enginx.net.key;
Also server_name cannot be 127.0.0.1, please use a domain name, for example:
server_name enginx.net;
Here is my SSL configuration file:
ssl on;
ssl_certificate /usr/local/nginx/ssl/enginx.net.crt;
ssl_certificate_key /usr/local/nginx/ssl/enginx.net.key;
ssl_buffer_size 16k;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache builtin:20480 shared:SSL:10m;
ssl_session_timeout 1h;
ssl_stapling on;
ssl_session_tickets on;