• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Resolved Reverse Proxy server (Nginx) won't start after renewing a domains certificate

Quinten

Regular Pleskian
Hello,

Yesterday i renewed a certificate for a domain and suddenly all the websites on the server went down.
After a bit i got apache to run but not the reverse proxy server nginx.

I get this error:

Unable to start service: Unable to manage service by nginxmng: ('start', 'nginx'). Error: [2022-05-19 10:10:52.436] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx_control' '--start'] with exit code [1] Can not start proxy server: /opt/psa/admin/sbin/nginx-config execution failed: nginx: [emerg] cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY) nginx: configuration file /etc/nginx/nginx.conf test failed

After reading some other posts about this i tried a few things already:

- Tried rereading the IP
- Tried copying an existing certificate and changing the name to the one mentioned in error, no luck
- Tried using the web repair
- Tried disabling and renabling but doe not work
  • /usr/local/psa/admin/bin/nginxmng --disable
  • /usr/local/psa/admin/bin/nginxmng --enable
- Tried restoring backup form Plesk and of the Server but that also did not work.

Could anyone provide more help and insight in this please?

Nginx error log:
2022/05/19 07:55:17 [emerg] 30338#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 07:56:52 [emerg] 31477#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 08:05:34 [emerg] 13230#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 08:05:35 [emerg] 13254#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 09:19:54 [emerg] 20409#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 09:38:35 [emerg] 22735#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 09:56:26 [emerg] 24844#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 09:57:24 [emerg] 25159#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
2022/05/19 10:10:52 [emerg] 27298#0: cannot load certificate key "/opt/psa/var/certificates/cert-XzfWMF": PEM_read_bio_PrivateKey() failed (SSL: error:0906D06C:pEM routines:pEM_read_bio:no start line:Expecting: ANY PRIVATE KEY)
 
Hey thanks for the reply,

egrep -Rl scfNvuszu /etc/nginx/ 2> /dev/null running this command gives me nothing back
Sorry i see my mistake now.

I did what the thread said except disabling it.

Now if i want to start it i get

Unable to start service: Unable to manage service by nginxmng: ('start', 'nginx'). Error: [2022-05-19 11:12:00.741] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx_control' '--start'] with exit code [1] Can not start proxy server:
 
Please check the logs for errors:
/var/log/messages
/var/log/syslog
/var/log/nginx/error.log

Also, check if port 80 is already in use by another process:
Code:
# netstat -plnt | grep ':80'
 
Please check the logs for errors:
/var/log/messages
/var/log/syslog
/var/log/nginx/error.log

Also, check if port 80 is already in use by another process:
Code:
# netstat -plnt | grep ':80'
Thanks for your reply.

/var/log/messages is empty
/var/log/syslog has alot of mail related logs but do not see anything else for now
/var/log/nginx/error.log sais some warning abouts server name conflicting but they are being ignored

to netstat -plnt | grep ':80'
tcp6 0 0 :::80 :::* LISTEN 1220/apache2
 
Please try these steps to auto-correct the issue:
# /usr/local/psa/admin/sbin/nginxmng -d
# /usr/local/psa/admin/sbin/nginxmng -e

This will reconfigure all Apache and Nginx web server configuration files, and set the Apache configuration to ports 7080 and 7081.
 
Can you advise please, I tried to rebuild, still nginx is not built, it's in red color
Please try these steps to auto-correct the issue:
# /usr/local/psa/admin/sbin/nginxmng -d
# /usr/local/psa/admin/sbin/nginxmng -e

This will reconfigure all Apache and Nginx web server configuration files, and set the Apache configuration to ports 7080 and 7081.
Unable to configure the web server: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-all [1] => -skip-removing ) Details: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-server [1] => -no-restart ) Details: [2025-07-19 11:24:13.130] 241656:687b562d1fc02 ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1] [2025-07-19 11:24:13.232] 241656:687b562d1fc02 ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1] [2025-07-19 11:24:13.237] 241656:687b562d1fc02 ERR [panel] Apache config (17529134520.94112700) generation failed: Template_Exception: nginx: [emerg] "proxy_ssl_server_name" directive is duplicate in /etc/nginx/conf.d/z_fix_ssl_sni.conf:1 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] "proxy_ssl_server_name" directive is duplicate in /etc/nginx/conf.d/z_fix_ssl_sni.conf:1 nginx: configuration file /etc/nginx/nginx.conf test failed1752913733172.png
 
Back
Top