Unable to open config file /usr/lib/ssl/openssl.cn

2019-09-13 18:59发布

问题:

I have LEMP and I'm trying to install PureFTPd and Quota. When I enter the following command:

openssl req -x509 -nodes -days 7300 -newkey rsa:2048 \
  -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

I have error:

WARNING: can't open config file: /usr/lib/ssl/openssl.cnf
Unable to load config info from /usr/lib/ssl/openssl.cnf

I have this file:

find / -name openssl.cnf
/usr/lib/ssl/openssl.cnf
/etc/ssh/ssl/openssl.cnf

How can I fix this issue?

回答1:

Ubuntu places openssl.cnf for the OpenSSL here

/usr/lib/ssl/openssl.cnf

/usr/lib/ssl/openssl.cnf will be used when you issue:

openssl s_client -connect example.com:443 -tls1 -example.com localhost