系统版本ubuntu20.04启动nginx出现的问题
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)
解决方法:生成秘钥时命令如下
openssl genrsa -des3 -out server.key 1024
改为
openssl genrsa -des3 -out server.key 2048