Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
The first thing I'd look is in the nginx logs. If those don't tell you much, you should increase the verbosity, until the logs tell you something useful.
This is the output I get from command 'cat /var/log/nginx/error.log' after trying to open https://www.open-plant.com
2022/01/16 08:16:53 [error] 30879#30879: *846 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
2022/01/16 08:16:53 [error] 30879#30879: *847 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
2022/01/16 08:16:55 [error] 30879#30879: *848 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
2022/01/16 08:16:55 [error] 30879#30879: *849 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
Thanks for the suggestiosn but I tried both suggestions neither of them seems to work. It still says (in nginx logs)
2022/01/16 14:04:12 [error] 1557#1557: *14 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
when I try browsing the website. Weird its saying no SSL certificate but my SSL certs are all valid
Thank for the suggestions but none of them worked, I am still seeting the same error when browsing my website (nginx logs)
2022/01/16 14:04:12 [error] 1557#1557: *14 no "ssl_certificate" is defined in server listening on SSL port while SSL handshaking, client: 220.158.189.181, server: 0.0.0.0:443
This problem is happening to all my websites, therefore it must be something related to a global setting.
The only strange thing I can find is that there's only a server_name www.open-plant.com which is missing the hostname open-plant.com (i.e.: without www).
But if that's going to fix your nginx, I'm not sure.
Also, I've never seen that error message before. Usually, a webserver refuses to start if it can't find the certificate at start up.. So why is it only complaining when connecting? I dunno..
Thank you all for the help. I found the culprit. It was actually due to two similar "include" statements found in the various conf files. Particularly it was the '/etc/nginx/sites-available/default.conf' file and the '/etc/nginx/sites-enabled/00-default.conf' files
Nginx is so convoluted!
It was nothing to do with Lets Encrypt. But thank you very much for all the help, definitely it pointed me to the right direction.
As Rudy already somewhat hinted to, but not explicitely said:
The sites-available is a directory where AVAILABLE configuration files are placed. Usually, one would ENABLE some (or all, if required) of those configuration files by symbolically linking files from the sites-available to the sites-enabled directory. And in the main nginx configuration, one would only include the sites-enabled directory. That way, by aid of the symbolic links, one can choose which configuration file one does and doesn't want to have enabled.
Including the entire sites-available directory is not how the nginx directory structure is supposed to work.