Applicable to:
- Plesk for Linux
Symptoms
-
The following error is shown in Plesk:
Template_Exception: nginx: [emerg] cannot load certificate "/usr/local/psa/var/certificates/XXXX": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/scfcUPC5w','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed -
Cannot start nginx:
# service nginx restart
Restarting nginx (via systemctl): Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
-
nginx configuration is broken:
# nginx -t
nginx: [emerg] cannot load certificate "/usr/local/psa/var/certificates/XXXX": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/XXXX','r') error:2006D080:BIO routines:BIO_new_file:no such file) -
Private key is missing in the certificate file mentioned in the error message:
# grep PRIVATE KEY /usr/local/psa/var/certificates/XXXX
Cause
Corrupted SSL certificate.
Resolution
-
Connect to the server via SSH
-
Repair the SSL certificates:
# plesk repair web -sslcerts
Should the solution above not help:
1. Log in to Plesk via SSH
2. Identify default Plesk certificate file name:
# plesk db "select id,cert_file,ca_file,name from certificates where name like '%default%'"
+----+-------------+---------+---------------------+
| id | cert_file | ca_file | name |
+----+-------------+---------+---------------------+
| 2 | certwW8DCMw | | default certificate |
+----+-------------+---------+---------------------+
3. Replace the corrupted certificate with default one:
# cp /usr/local/psa/var/certificates/certlTuBPTm /usr/local/psa/var/certificates/XXXX
4. Re-enable nginx:
# /usr/local/psa/admin/bin/nginxmng -d
# /usr/local/psa/admin/bin/nginxmng -e
Comments
0 comments
Please sign in to leave a comment.