• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

[PPP-13673] New SSL Certificate produces nginx/apache configuration errors

AbramS

Basic Pleskian
Recently had to replace an expiring SSL certificate which was linked directly to a dedicated IPv4 and IPv6 as it's used for the server's hostname, imapd, smtpd and Plesk panel.

1. Created the new certificate as usual: certificate + most recent PostiveSSL_Bundle as provided by the party that has always generated by certificates.
2. Certificate is recognised as expected. No errors and: Domain Control Validated; PositiveSSL
3. Marked the certificate for use by Plesk Panel.
4. Changed the associated dedicated IPv4 address and IPv6 address in Tools & Settings > IP Addresses to use the new certificate.

Once I then visit the Plesk Panel homepage I'm confronted with the following warning:

New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-R9UoOq") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-R9UoOq','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

System Overview:
CentOS 6.6 (Final) with Plesk 12.0.18 Update #30

Webserver Configurations Troubleshooter:

Checker: Found errors: 0; Found Warnings: 0

Configurations Show Errors:

ID 9 /var/www/vhosts/system/inspyred.nl/conf/nginx.conf nginxDomainVhost
ID 151 /var/www/vhosts/system/inspyred.nl/conf/nginx_ip_default.conf nginxDomainVhostIpDefault
ID 71 /var/www/vhosts/system/sonnet.inspyred.nl/conf/nginx.conf nginxDomainVhost

How to properly fix this?

Additional information:

Earlier this week I already ran into this problem as the new certificate was generated back then. The first time I used the existing CSR to generate the new certificate and replace the previously existing certificate and CA certificates.

I ended up with the exact same issue and decided to do the following:
1. Follow the suggestions in the "Nginx does not start after IP change" knowledgebase article:

You can fix the issue using the following commands:
# /usr/local/psa/bin/reconfigurator --autoconfigure
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
# /etc/init.d/nginx restart

2. I ended up doing a couple of (graceful) restarts of httpd and nginx (and named at some point).
3. I restarted the server.

At that point the warning was no longer being displayed and everything seemed to work ok... Then I started getting emails from watchdog indicating that the Web Server (Apache) and Web Proxy Server (Nginx) were going down and coming up again every now and again.

Weirdly I was unable to see the root processes go down or even the child processes get under 10 instances at any given time through my NewRelic monitor, nor did I receive any 'unable to ping' warnings from Plesk, the datacenter or NewRelic, which I normally do get. Finally, this downtime was not mentioned in the Plesk Monitor iPhone app either...

Because I didn't like the above 'ghost' reports, I had the certificate reissued today, set the related IPs to the default cert, completely removed the old certificate and created a new request with a new CSR. Unfortunately, as stated above, the result is the same.

Update: just had a look in /usr/local/psa/var/certificates/ and the file cert-R9UoOq, which is mentioned in the error, does not exist in that directory. The similar error that I had earlier last week also indicates a missing cert: cert-OHzYte. This file is not in the directory either.

It seems that Plesk is either writing the certificate to the wrong directory/file or isn't at all able to write to the /../certificates/ directory.

Based on the above premise I've done some more digging and have come to a somewhat weird conclusion:

Next to the 'faulty' certificate that I'm discussing here, I've got two more 'real' certificates that were created in the same way and are bound to their own dedicated IPs. After some comparing I found that the files cert-BrS7qJ and cert-m4yxa8 in the /../certificates folder contain the other signed/real certificates that are currently in use. While comparing I also looked at the most recent files created, and guess what: the contents of cert-Djpuzc is actually the new certificate in its entirety.

A couple of things that are of note here:
1. Why are the webservers looking for cert-R9UoOq while the file was saved by Plesk as cert-Djpuzc ?
2. Two of the certificates have Access: (0400/-r--------) with user and group root. One of the working certificates has user/group psaadm - why is there a difference?
3. Finally: I saw that based on the Plesk CSR this new certificate was issued as SHA2, while the older two are SHA1. Can this be an issue? (Guess not as the certificate does work perfectly well for the panel, just not for apache / nginx)

As a temporary fix I've done cp cert-Djpuzc cert-R9UoOq which allowed me to save and apply the configuration.

Finally the details for the discussed files:

New certificate that is causing issues and has the wrong name:
-r--------. 1 root root 10262 Jan 12 21:28 cert-Djpuzc

File: `cert-Djpuzc'
Size: 10262 Blocks: 24 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 134439 Links: 1
Access: (0400/-r--------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-01-12 21:28:11.001374506 +0100
Modify: 2015-01-12 21:28:07.578355087 +0100
Change: 2015-01-12 21:28:07.595355182 +0100

The older (functioning) certificates:
-r--------. 1 psaadm psaadm 7805 Sep 3 20:31 cert-BrS7qJ

File: `cert-BrS7qJ'
Size: 7805 Blocks: 16 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 151229 Links: 1
Access: (0400/-r--------) Uid: ( 500/ psaadm) Gid: ( 500/ psaadm)
Access: 2015-01-12 14:26:08.000905608 +0100
Modify: 2014-09-03 20:31:29.068485520 +0200
Change: 2015-01-12 14:19:13.669572491 +0100

-r--------. 1 root root 7871 Sep 3 20:31 cert-m4yxa8

File: `cert-m4yxa8'
Size: 7871 Blocks: 16 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 152997 Links: 1
Access: (0400/-r--------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-01-11 23:03:12.012413236 +0100
Modify: 2014-09-03 20:31:29.069485526 +0200
Change: 2014-09-03 20:31:29.069485526 +0200
 
Last edited:
IgorG, could you provide some of your infinite Plesk wisdom on this case?

Would be much appreciated!

P.S. I was finally able to find others with the same issue in the comments section of the Parallels Plesk 12.0 for Linux Systems Release Notes. A Kees Velker and Hugo Snellen discussed this issue 7 months ago and apparently never received feedback in regards to the problem.
 
Last edited:
Yes, it is known issue to us. Corresponding bugreport PPP-13673 is under developer's investigation now.
 
Good to know Igor. Thanks for the reply. Could you let me knop if the applied workaround is the correct one for now? copying the related file in the certificates directory to have the requested filename? Thanks!
 
Workaround is run /usr/local/psa/admin/sbin/httpdmng --reconfigure-server

[root@a10-52-63-182 ~]# nginx -t
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/certMGRvdvP") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/certMGRvdvP','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@a10-52-63-182 ~]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-server
[root@a10-52-63-182 ~]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@a10-52-63-182 ~]#
 
Sergey, thanks for the information. Is this a one-time workaround or would this have to be repeated when adding new certificates?
 
I have the same Issue with a new Plesk Default Cert:
Code:
Aufgrund folgender Fehler in den Konfigurations-Templates konnten keine neuen Konfigurationsdateien für den Apache Webserver erstellt werden: nginx: [emerg] BIO_new_file("/opt/psa/var/certificates/cert-Vij2J2") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/psa/var/certificates/cert-Vij2J2','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed . Ausführliche Fehlerbeschreibungen wurden Ihnen per E-Mail zugesendet. Bitte lösen Sie das Problem und klicken Sie hier, um die beschädigten Konfigurationsdateien erneut zu erstellen, oder hier, um alle Konfigurationsdateien zu erstellen. Einzelheiten im Configuration Troubleshooter ansehen
 
I have the same Issue with a new Plesk Default Cert:
Code:
Aufgrund folgender Fehler in den Konfigurations-Templates konnten keine neuen Konfigurationsdateien für den Apache Webserver erstellt werden: nginx: [emerg] BIO_new_file("/opt/psa/var/certificates/cert-Vij2J2") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/psa/var/certificates/cert-Vij2J2','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed . Ausführliche Fehlerbeschreibungen wurden Ihnen per E-Mail zugesendet. Bitte lösen Sie das Problem und klicken Sie hier, um die beschädigten Konfigurationsdateien erneut zu erstellen, oder hier, um alle Konfigurationsdateien zu erstellen. Einzelheiten im Configuration Troubleshooter ansehen
did you try run /usr/local/psa/admin/sbin/httpdmng --reconfigure-server ?
 
Sergey, thanks for the information. Is this a one-time workaround or would this have to be repeated when adding new certificates?
I hope we will fix this issue before next your ssl certificate update :)
 
Workaround in #5 did not work for me.

>> Workaround is run /usr/local/psa/admin/sbin/httpdmng --reconfigure-server

[root@vmclone1]# nginx -t
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/certUPZrVIX") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/certUPZrVIX','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@vmclone1]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-server
[2015-03-06 18:04:15] ERR [util_exec] proc_close() failed
[2015-03-06 18:04:53] ERR [util_exec] proc_close() failed
[2015-03-06 18:05:08] ERR [panel] Apache config (14256830430.82263100) generation failed: Template_Exception: nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/certUPZrVIX") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/certUPZrVIX','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/certUPZrVIX") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/certUPZrVIX','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
 
any updates on bug PPP-13673? I can't seem to find any mention of it outside of this thread...
 
Hi Guys

I've had success today with a different workaround for this problem: force Plesk to re-read its IP(s). Seems that this results in the configuration files being correctly regenerated allowing nginx to startup normally.

YMMV, obviously.

Good luck,
Nathan
 
As far as I see this bug has been fixed in upcoming Plesk 12.5 version. You can check it in available Preview.
 
After installing a new SSL certificate i had the same problem but
1000 Thanks for that solution it worked well, my day is saved ;)
 
Hi all,

It seems that i have the same problem now.
I've update plesk to Plesk Onyx 17.0.17 version, tried to create ssl files again, but i still have the error:


New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-Q8u9ld") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-Q8u9ld','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed .


If i run /usr/local/psa/admin/sbin/httpdmng --reconfigure-server -It doesnt help

[2017-03-12 21:08:32] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin /bin/nginx-config' '-t'] with exit code [1]
[2017-03-12 21:08:33] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin /bin/nginx-config' '-t'] with exit code [1]
[2017-03-12 21:08:34] ERR [panel] Apache config (14893421110.94825300) generatio n failed: Template_Exception: nginx: [emerg] BIO_new_file("/usr/local/psa/var/ce rtificates/cert-Q8u9ld") failed (SSL: error:02001002:system library:fopen:No suc h file or directory:fopen('/usr/local/psa/var/certificates/cert-Q8u9ld','r') err or:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-Q8u9ld") faile d (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/us r/local/psa/var/certificates/cert-Q8u9ld','r') error:2006D080:BIO routines:BIO_n ew_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed



Can you help please?
 
What about

# plesk repair web

?

Doesnt' help...


Repair web server configuration for all domains? [Y/n] Y
Repairing web server configuration for all domains. This aspect
can be used with individual domains ("plesk repair web
example.com"), and on the server level ("plesk repair web") ..... [2017-03-1 3 06:16:58] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpd mng' '--reconfigure-all'] with exit code [1]
[FAILED]
- httpdmng failed: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => oil4life.ru
)

Details: [2017-03-13 06:16:50] ERR [util_exec] proc_close()
failed ['/usr/local/psa/admin/bin/nginx-config' '-w'
'/var/www/vhosts/system/oil4life.ru/conf/nginx.conf'] with exit
code [100]
[2017-03-13 06:16:50] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-t'] with exit code
[1]
[2017-03-13 06:16:51] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-r'
'/var/www/vhosts/system/oil4life.ru/conf/nginx.conf'] with exit
code [1]
[2017-03-13 06:16:52] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-r'
'/var/www/vhosts/system/oil4life.ru/conf/nginx.conf'] with exit
code [1]
[2017-03-13 06:16:53] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-r'
'/var/www/vhosts/system/oil4life.ru/conf/nginx.conf'] with exit
code [1]
[2017-03-13 06:16:54] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-r'
'/var/www/vhosts/system/oil4life.ru/conf/nginx.conf'] with exit
code [1]
[2017-03-13 06:16:54] ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/nginx-config' '-t'] with exit code
[1]
[2017-03-13 06:16:56] ERR [panel] Apache config
(14893750100.04181000) generation failed: Template_Exception:
Can not read/write to
/var/www/vhosts/system/oil4life.ru/conf/nginx.conf

file:
/usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
Can not read/write to
/var/www/vhosts/system/oil4life.ru/conf/nginx.conf
 
Try to run

# chattr -i /var/www/vhosts/system/oil4life.ru/conf/nginx.conf
# plesk repair web
 
Back
Top