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.
My web server is (include version):
The operating system my web server runs on is (include version):
Ubuntu 22 EC2
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know):
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
So I created standalone certificates since as it seems you need to have a PhD in something to be able to get a bloody certificate for your domain, I still don't know why is this so complicated. I've got the files, they're located properly in /etc/letsencrypt/live/mydomain.com, I double checked that, also my docker-compose and nginx.conf are properly configured but once I up my application, nginx cries how he cant find the files that exist. Anyone has a simple solution/fix for this?
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/posology-api.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/posology-api.com/privkey.pem
This certificate expires on 2023-05-03.
2023/02/02 23:54:11 [emerg] 7#7: cannot load certificate "/etc/letsencrypt/live/posology-api.com/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/posology-api.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx | nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/posology-api.com/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/posology-api.com/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
Sorry for late reply, I managed to solve it. I did use that init-letsencrypt.sh script everyone is telling it wrong, but as I cloned that guy's repo and executed the script, it went through and I just copied the 'data' folder to my project, ran docker-compose up and my app is now up on a https. Thank you for your time mate