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 domain is: gulam-api.me
I ran this command: Context: I have a web servide running on ec2 with docker-compose. the docker-compose.prod.yml looks like this :
version: '3.7'
services:
web:
build: .
image: app
command: bash -c "yarn start"
working_dir: /app
nginx:
image: nginx:latest
restart: unless-stopped
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- '80:80'
- '443:443'
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
sudo docker compose -f docker-compose.prod.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ --dry-run -d gulam-api.me
It produced this output:
t certonly --webroot --webroot-path /var/www/certbot/ --dry-run -d gulam-api.me -v
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Simulating a certificate request for gulam-api.me
Performing the following challenges:
http-01 challenge for gulam-api.me
Using the webroot path /var/www/certbot for all unmatched domains.
Waiting for verification...
Challenge failed for domain gulam-api.me
http-01 challenge for gulam-api.me
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: gulam-api.me
Type: unauthorized
Detail: 185.199.111.153: Invalid response from http://gulam-api.me/.well-known/acme-challenge/lvugb4wyNw9Lald2-Xa-R4m5urehq7nEM0-ySYeuGD8: 404
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
Cleaning up challenges
Some challenges have failed.
My web server is (include version): The ngianx provided on the docker-compose file.
the specific settings of the nginx are the followin.
server {
listen 80;
listen [::]:80;
server_name gulam-api.me www.gulam-api.me;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://gulam-api.me$request_uri;
}
}
The operating system my web server runs on is (include version): Ubuntu 20.04 ec2 machhine
My hosting provider, if applicable, is: can't remember
I can login to a root shell on my machine (yes or no, or I don't know): yes
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): Provided on the docker-compose file
I know that i need to create some dummy certificated for my server before running the real ones, I am followin this guide