Nginx Error: SSL: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small


ubuntu20.04 nginx startup error:

root@ubuntu:/etc/nginx/conf.d# nginx -s reload
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /etc/nginx/conf.d/xx.conf:12
nginx: [emerg] SSL_CTX_use_certificate("/etc/nginx/conf.d/crt/server.crt") failed (SSL: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small)

 

Solution: When generating the secret key, the command is as follows
openssl genrsa -des3 -out server.key 1024
Modify to
openssl genrsa -des3 -out server.key 2048

Read More: