Can't resintall Certbot or restart Nginx

I was trying to delete the certbot I currently had installed and reinstall it but now I get the error below. I tried to sudo service restart ngix after trying to recreate the configuration file and I get this error
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] cannot load certificate "/etc/letsencrypt/live/filehb.tech/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::N o such file or directory:calling fopen(/etc/letsencrypt/live/filehb.tech/fullchain.pem, r) error:10000080:BIO routines::no such file)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n')
root@Omnihost:~# sudo systemctl restart nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

My domain is:https://filehb.tech/

I ran this command: sudo certbot --nginx

It produced this output:ln: missing file operand
Try 'ln --help' for more information.
root@Omnihost:~# sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/filehb.tech/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/filehb.tech/fullchain.pem, r) error:10000080:BIO routines::no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

My web server is (include version): Nginx 1.18.0

The operating system my web server runs on is (include version): Ubunto 22.04.3

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

Deleting certs is rarely needed to correct a problem. But, since you already started down that road you should review the steps below about Safely Deleting Certificates.

It looks like you have not yet removed the cert file references from nginx. nginx will not start if its config has references to files that don't exist.

https://eff-certbot.readthedocs.io/en/latest/using.html#safely-deleting-certificates

3 Likes

Please continue in your previous thread: Accidently Deleted SSL Certifiacte

I don't see any difference or something new in this thread compared to that one. Thanks.

2 Likes