Wondering how to resolve BIO_new_file: certificate not found error in Plesk? We can help you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team help a customer deal with this plesk error.
How to resolve BIO_new_file: certificate not found error in Plesk?
Plesk is a commercial web hosting and server data center automation software with a control panel developed for Linux and Windows-based retail hosting service providers.
Typically, nginx or Apache fails to start with the following error:
Nginx:
BIO_new_file(“/usr/local/psa/var/certificates/cert-rWXDy2“) failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(‘/usr/local/psa/var/certificates/cert-rWXDy2‘,’r’) error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed
Copy Code
Apache:
AH00526: Syntax error on line 51 of /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf:SSLCertificateFile: file ‘/opt/psa/var/certificates/cert-rWXDy2’ does not exist or is empty
Copy Code
Or the same errors are displayed upon the attempt to create a subscription.
Usually, issue occurs by leftover configuration of the removed domain.
The certificate file from the error can find in different configuration files.
grep -rl cert-rWXDy2 /var/www/vhosts/system/ | sort | uniq/var/www/vhosts/system/example.com/conf/httpd.conf/var/www/vhosts/system/example.com/conf/nginx.conf
Copy Code
Today, let us see the steps followed by our Support techs to resolve it.
1. Firstly, connect to the server via SSH.
2. Then, locate the configuration files that mention the certificate:
grep -r cert-rWXDy2 /var/www/vhosts/system/*
Copy Code
/var/www/vhosts/system/example.com/conf/httpd.conf: SSLCertificateFile /usr/local/psa/var/certificates/cert-rWXDy2/var/www/vhosts/system/example.com/conf/nginx.conf: ssl_certificate /usr/local/psa/var/certificates/cert-rWXDy2;
Copy Code
3. Remove them:
rm -f /var/www/vhosts/system/example.com/conf/nginx.conf
Copy Code
rm -f /var/www/vhosts/system/example.com/conf/httpd.conf
Copy Code
4. Then, remove the symlink for the config file:
rm -f /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf# rm -f /etc/nginx/plesk.conf.d/vhosts/example.com.conf
Copy Code
5. If the same error happens again, find and change the extension of the leftover config files:
find /etc/httpd/ /etc/nginx/ -name *example.com*.conf -print0 | xargs –null -I{} mv {} {}_leftover
Copy Code
6. Finally, vverify the operation with:
find /etc/httpd/ /etc/nginx/ -name *example.com*/etc/httpd/conf/plesk.conf.d/webmails/example.com_webmail.conf_leftover/etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf_leftover/etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf_leftover/etc/nginx/plesk.conf.d/vhosts/example.com.conf_leftover
Copy Code
[Need a solution to another query? We are just a click away.]
Conclusion
Today, we saw steps followed by our Support Engineers to resolve certificate not found error in Plesk.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments