Nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/domain.com/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/domain.com/fullchain.pem','r')

i delete ssl domain with command
$ sudo certbot delete --cert-name example.com

and then, i found error this server when start my nginx and etc

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/siakad-api.babussalam.online/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(’/etc/letsencrypt/live/siakad-api.babussalam.online/fullchain.pem’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

1 Like

You seem to have deleted a cert that is still (trying to be) used somewhere.
Let’s find where with:

grep -R /etc/letsencrypt/live/siakad-api.babussalam.online/fullchain.pem /etc/nginx/
3 Likes

This command only deletes the certificate.
If you want to remove a domain from using SSL, you should disable the file it runs SSL in:
unlink /etc/nginx/sites-enabled/<file-name>.conf
[presuming the file only has the one domain in it - if not, you may have to remove the part(s) manually]
[the actual file should still remain in the /sites-available/ folder (unharmed) for possible future use or review]
[don’t forget to restart/reload nginx]

3 Likes

Thanks you, this is solved

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.