Hi there. Some time ago I followed this guide on how to create certificates with Docker. I managed to create a few certificates. Now after some time, I am trying to create a certificate for a new subdomain, however I keep failing even though I use the same method as before.
My domain is:
matrix.jeanclaudegraf.ch
I ran this command:
sudo docker run -it --rm
-v /docker-volumesII/etc/letsencrypt:/etc/letsencrypt
-v /docker-volumesII/var/lib/letsencrypt:/var/lib/letsencrypt
-v ${pwd}/letsencrypt-site:/data/letsencrypt
-v /docker-volumesII/var/log/letsencrypt:/var/log/letsencrypt
certbot/certbot
certonly --webroot
--register-unsafely-without-email --agree-tos
--webroot-path=/data/letsencrypt
--staging
-d www.matrix.jeanclaudegraf.ch -d matrix.jeanclaudegraf.ch
It produced this output:
Status: Downloaded newer image for certbot/certbot:latest
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for matrix.jeanclaudegraf.ch
http-01 challenge for www.matrix.jeanclaudegraf.ch
Using the webroot path /data/letsencrypt for all unmatched domains.
Waiting for verification...
Challenge failed for domain www.matrix.jeanclaudegraf.ch
Challenge failed for domain matrix.jeanclaudegraf.ch
http-01 challenge for www.matrix.jeanclaudegraf.ch
http-01 challenge for matrix.jeanclaudegraf.ch
Cleaning up challenges
Some challenges have failed.IMPORTANT NOTES:
The following errors were reported by the server:
Domain: www.matrix.jeanclaudegraf.ch
Type: unauthorized
Detail: Invalid response from
http://www.matrix.jeanclaudegraf.ch/.well-known/acme-challenge/0FJoK3PzKflEqDeGThpu2QzX_ijuVLYyfN1YJ8YpUq0
[46.127.188.60]: "\r\n404 Not
Found\r\n\r\n404 Not
\r\n
Found
nginx/1.17.1</ce"Domain: matrix.jeanclaudegraf.ch
Type: unauthorized
Detail: Invalid response from
http://matrix.jeanclaudegraf.ch/.well-known/acme-challenge/zKCrvm-cIZqjv48nyCLvkKOuAjcski94DM8XVbxgpMo
[46.127.188.60]: "\r\n404 Not
Found\r\n\r\n404 Not
\r\n
Found
nginx/1.17.1</ce"To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version):
Nginx 1.17.3
The operating system my web server runs on is (include version):
Debian Buster 10
My hosting provider, if applicable, is:
self-hosted
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):
v0.37.1
My nginx.conf
config:
server {
listen 80;
listen [::]:80;
server_name matrix.jeanclaudegraf.ch www.matrix.jeanclaudegraf.ch;location ~ /.well-known/acme-challenge { allow all; root /usr/share/nginx/html; } root /usr/share/nginx/html; index index.html;
}
The output of nginx:
[error] 6#6: *28 open() "/usr/share/nginx/html/.well-known/acme-challenge/zKCrvm-cIZqjv48nyCLvkKOuAjcski94DM8XVbxgpMo" failed (2: No such file or directory), client: xxx, server: matrix.jeanclaudegraf.ch, request: "GET /.well-known/acme-challenge/zKCrvm-cIZqjv48nyCLvkKOuAjcski94DM8XVbxgpMo HTTP/1.1", host: "matrix.jeanclaudegraf.ch"
Here to output of check-your-website.server-daten.de
When creating .well-known/acme-challenge/1234
in the webroot I am able to access that file via matrix.jeanclaudegraf.ch/.well-known/acme-challenge/1234
.
Thank you very much in advance!