• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Can't start nginx

Patrick1246

New Pleskian
Hello everybody

After a plesk update to 17.5 I have problems to start nginx, the output for nginx -t is the follow

nginx: [emerg] SSL_CTX_use_PrivateKey_file("/opt/psa/var/certificates/cert-CLdkI q") failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expectin g: ANY PRIVATE KEY error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:pEM l ib)
nginx: configuration file /etc/nginx/nginx.conf test failed

Is it possible to create a new certificate in the Plesk Panel and make it as default for the nginx config to solve this issue? Rebuild Config doesn't work.

best regards
Patrick
 
I tried this once again, but when I run the repair, I get this Error

Repairing web server configuration
Repairing web server configuration for the domain v22017013465742348.happysrv.de[2018-08-16 10:06:27] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/httpdmng' '--reconfigure-domain' 'v22017013465742348.happysrv.de'] with exit code [1]
[FAILED]
- httpdmng failed: [2018-08-16 10:06:25] ERR [util_exec]
proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t']
with exit code [1]
[2018-08-16 10:06:26] ERR [util_exec] proc_close() failed
['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2018-08-16 10:06:26] ERR [panel] Apache config
(15344067850.66717400) generation failed: Template_Exception:
nginx: [emerg]
SSL_CTX_use_PrivateKey_file("/opt/psa/var/certificates/cert-CLdkIq")
failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start
line:Expecting: ANY PRIVATE KEY error:140B0009:SSL
routines:SSL_CTX_use_PrivateKey_file:pEM lib)
nginx: configuration file /etc/nginx/nginx.conf test failed

file:
/opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg]
SSL_CTX_use_PrivateKey_file("/opt/psa/var/certificates/cert-CLdkIq")
failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start
line:Expecting: ANY PRIVATE KEY error:140B0009:SSL
routines:SSL_CTX_use_PrivateKey_file:pEM lib)
nginx: configuration file /etc/nginx/nginx.conf test failed

Error messages: 0; Warnings: 0; Errors resolved: 0
 
The FAQ article is generally correct, but it assumes that you are dealing with the host certificate. This is not necessarily the case. It is probably another certificate that is missing the private key file. I think a simple preliminary solution cann be to copy any existing private key file into the file name of the "missing" file. It will be a wrong key, but it will probably let Nginx start at least.
 
Back
Top