Error trying to issue certificate

Good afternoon all, I am struggling to get certbot to issue an initial certificate for my domain, I run into an invalid response error. I have access to the server and can run commands at root. i have placed a folder under /var/www/html/.well-known/acme-challenge and can access that from my browser. i foward my domain name using http://dmtc.ddns.net and i have port 80 and 443 open on my router forwarding traffic to the pi. many thanks in advance for your help

My domain is:dmtc-homeserver.co.uk

I ran this command:

sudo certbot certonly --agree-tos --webroot -w /var/www/html/ -d dmtc-homeserver.co.uk -d www.dmtc-homeserver.co.uk

It produced this output:

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:

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.

Some challenges have failed.

My web server is (include version):

NGINX version 1.14.2

The operating system my web server runs on is (include version):

Debian 10 (Buster)

My hosting provider, if applicable, is:

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):

Certbod 1.18.0

2 Likes

Your site seems to be running inside an "<iframe>" where it sources the URL for a different hostname, namely http://dmtc.ddns.net/...

This setup does not work with Let's Encrypt, as the Let's Encrypt validation server only follows HTTP redirects, not HTML style redirects or iframes.

Solution: don't use the iframe setup offered by your Namesco provider, but set your hostname dmtc-homeserver.co.uk to a CNAME with value dmtc.ddns.net and configure your webserver at 81.141.193.2 to answer for the hostname dmtc-homeserver.co.uk.

3 Likes

Hi Osiris,

Many thanks for the quick response, after some fiddling with the DNS settings from my domain name provider, I have managed to get a certificate issued

Many thanks for your help

4 Likes

Note that you've issued two separate certificates: one for dmtc-homeserver.co.uk and one for www.dmtc-homeserver.co.uk. However, if I go to www.dmtc-homeserver.co.uk, I'm seeing the incorrect certificate for dmtc-homeserver.co.uk. (See al your certs here: crt.sh | dmtc-homeserver.co.uk)

It's probably a good idea to include both hostnames in a single certificate. The certbot command in your first post should have done that, but perhaps you've used different commands later on?

3 Likes

Hi Osiris,

Many thanks for the update, I have now issued a certificate that covers both domains, so the error should have been corrected. I used the command detailed in my original post.

3 Likes

Yup, seems to be in order!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.