nginx配置新的SSL证书后浏览器仍显示之前的旧SSL证书

解决方案:

  • 需要先杀掉nginx的所有进程
    命令: taskkill /f /im nginx.exe
  • 配置SSL证书(windows环境下):
server {
        listen       5235 ssl http2 default_server;
        listen       [::]:5235 ssl http2 default_server;
        server_name xxx.com;
        ssl_certificate "D:/home/nginx-1.18.0/SSL/shelter/8403671_xxx.com.pem";
        ssl_certificate_key "D:/home/nginx-1.18.0/SSL/shelter/8403671_xxx.com.key";
        ssl_session_timeout 5m;
     #请按照以下协议配置
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
     #请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
     ssl_prefer_server_ciphers on;


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

     location / {
        root     "D:\home\ea_system\";
        try_files $uri $uri/ /index.html;

 }
        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
  • 启动nginx
    命令:start nginx

如果还不行,就在阿里云或腾讯云服务器上将旧的证书吊销并删除掉

你可能感兴趣的:(报错记录,nginx,ssl,https)