Default certificate is issued by Let's Encrypt.
After updating default certificate using XML-RPC, server configurations are broken and Apache or Nginx cannot start:
# service httpd start
Starting httpd: Syntax error on line 118 of /etc/httpd/conf/plesk.conf.d/server.conf:
SSLCertificateFile: file '/usr/local/psa/var/certificates/cert-pYAmnC' does not exist or is empty
# service nginx start
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/certwjFGVTD") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/certwjFGVTD','r') error:2006D080:BIO routines:BIO_new_file:no such file)
The following errors can be found in
[2017-11-03 08:23:10] ERR  '/usr/local/psa/admin/bin/nginx-config' '-t' failed with code 1.
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-yBuuRB") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-yBuuRB','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
[2017-11-03 09:41:18] ERR [panel] New configuration files for the Apache web server were not created due to the errors in configuration templates: Syntax error on line 45 of /etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf:
SSLCertificateFile: file '/usr/local/psa/var/certificates/cert-nBc0yQ' does not exist or is empty. <a target="_blank" href="http://kb.plesk.com/en/products/?id=52&qprod=52">Search in KB</a>
This issue has been considered as Plesk bug #PPPM-7398 and will be fixed in future product updates.
As a workaround, use the solution from the articles below: