php - nginx配置HTTPS出错
巴扎黑
巴扎黑 2017-04-27 09:01:22
0
5
710

浏览器报错信息

Nginx配置

巴扎黑
巴扎黑

reply all(5)
Peter_Zhu

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.

洪涛

nginx starts without error?

左手右手慢动作

Have you read nginx -t? Are there any logs left?

伊谢尔伦

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!

黄舟

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;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!