nginx ssl 错误,SSL 握手时监听 SSL 端口的服务器中未定义“ssl_certificate”

nginx ssl 错误,SSL 握手时监听 SSL 端口的服务器中未定义“ssl_certificate”

当我将 comodo ssl 添加到 centos 7 上的 nginx 服务器时,出现此错误

6925#0: *1045 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 2.89.238.146, server: 0.0.0.0:443

2019/04/30 16:47:08 [错误] 6925#0:*1046 SSL 握手时监听 SSL 端口的服务器中未定义“ssl_certificate”,客户端:156.196.125.24,服务器:0.0.0.0:443

我的配置文件是

server {

    listen 80;
    listen 443  default_server ssl;
    server_name s1c.govid.co;
    root         /var/www/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

 server {

====================

server {
    listen       443 ssl http2 default_server;
   listen       [::]:443 ssl http2 default_server;
   server_name  s1c.govid.co;
    ssl on;

   root         /var/www/html;

    ssl_certificate "/ssl/govid.co.crt";
    ssl_certificate_key "/ssl/govid.co. server {
   listen       443 ssl http2 default_server;
    listen       [::]:443 ssl http2 default_server;
    server_name  s1c.govid.co;
    ssl on;

   root         /var/www/html;

   ssl_certificate "/ssl/govid.co.crt";
    ssl_certificate_key "/ssl/govid.co.key";
   ssl_session_cache shared:SSL:1m;
   ssl_session_timeout  10m;
    ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
     ssl_protocols       TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;key";
    ssl_session_cache shared:SSL:1m;

相关内容