Hi,
I’m Facing an issue using Certbot certificate on my server, i created the server and installed docker on it and used this link in order to use docker-compose to get nginx with Certbot :
Every thing worked fine and the certificate files were generated without issues, but when i open Nginx base URL i get certificate invalid.
I tried to check the files created by Certbot image and i can see that i have two certificates in my fullchain.pem file so the structure as follow:
BEGIN CERTIFICATE
certificate text
END CERTIFICATE
BEGIN CERTIFICATE
certificate text
END CERTIFICATE
My domain is: bitool.winstaging.com
I ran this command:
./init_letsencrypt.sh
docker-compose up
My web server is running amazon linux 2 AMI
I can login to a root shell on my machine (yes or no, or I don’t know): Yes
It seems like you are using the staging server instead of the production server, which makes the certificate invalid (because the certificate issued by staging isn’t trusted )
Pinging @alaanimeh since this is a update.
So for the script, init-letsencrypt.sh, please go to your local copy and see line 12. I believe you’ve put a 1 on there, which means Let’s Encrypt will communicate with staging server and get a certificate that’s not trusted for testing purposes. Change that to 0 and try to reissue it, then you probably are good to go. (You might need to tune the Nginx config a little bit to accompany the new change)